Hello! In an application I have the problem of reading the contents of the TwinCAN Controller A Status Register. Below you will see a code snipped and what the compiler creates out of it:
773: mem=CAN_ASR; 00010C5A D7408000 EXTP #0x0080,#1 00010C5E F2F40402 MOV R4,DPP0:0x0204 00010C62 E4801E00 MOVB [R0+#0x001E],RL4
The ASR is telling you that you are in a bus off state. The LEC will no longer be updated since the bus is disconnected. Is your software making use of the Error Interrupt or the Status Change Interrupt? An Ack Error will not cause you to go bus-off. So you need to first track down the reason for the bus-off.