Hi,
First of all, be sure the full register access is used to clear particular IRQ flag. The flag is cleared by writing 1 into a bit position, so if the bit access is used, read-modify-write operation is done and so other flags may be cleared unintentionally, causing not generating the pending interrupt.
See more in following EB758 document; http://cache.freescale.com/files/32bit/doc/eng_bulletin/EB758.pdf.
Regarding the Bus-off functionality …
In case the automatic recovery mode is disabled, BOFF_REC = 1, the recovery from bus-off starts after both independent events have become true:
- 128 occurrences of 11 consecutive recessive bits on the CAN bus have been monitored
- BOFF_REC has been cleared by the user
So if negation happens
- before 128 sequences of 11 recessive bits are detected on the CAN bus, then Bus Off recovery happens in similar way as in automatic recovery way.
- after 128 sequences of 11 recessive bits occurred, then FlexCAN will resynchronize to the bus by waiting for 11 recessive bits before joining the bus.
In automatic Bus-off recovery mode the behavior is the same, you just do not clear BOFF_REC, soo… after 128 sequences of 11 recessive bits occurred, then FlexCAN will resynchronize to the bus by waiting for 11 recessive bits before joining the bus.
BR, Petr