I'm having a lot of trouble dealing with bus errors on my KE06 product. When I induce a bus error, say by being the only one on the bus and I send a frame, the peripheral enters a bus-flooding retry state.
The trouble occurs when I try to inhibit the bus flood. Requesting an abort by way of MSCAN_CANTARQ=MSCAN_CANTBSEL is usually successful but every few tries the flood continues and I don't get the TXE interrupt advertised by the ref manual.
Attempting to work around this with manual bus recovery is unsuccessful for two different, mutually exclusive reasons: 1) BOHOLD in MSCAN_CANMISC is never set despite BORM being set in MSCAN_CANCTL1.
2) There doesn't seem to be a way to tell that the bus off condition has cleared: SYNCH remains set despite the bus off state.
Has anyone encountered a similar problem with this peripheral on the KE06? Seems strange for such a mature periph module.
On you target board, Have you connected the CAN tranceiver to the CAN TX/RX pins? have you connected the CAN transceiver to a CAN bus which has another CAN node? As you know that CAN transmitter needs acknowledge bit which is driven by receiver, if you only have one node on the can bus, there is issue, in the case, I suggest you use loop back mode to have a test.
If it is not your case, i am sorry.
Thank you for your reply. I'm afraid I wasn't clear as to my need which is how to reliably stop the CAN peripheral's retries during a bus fault, when, for ex., the CAN peripheral's receiver fails and the peripheral floods the bus. If I induce a failure by removing the other node from the bus, the ack bits cease, and my KE06 begins to send retries until I issue an abort. That works two times. In other words, my KE06's CAN peripheral stops its retries, as desired. But for some reason the peripheral doesn't honor my third (or subsequent) abort requests. I am aborting by writing the lowest active bit in MSCAN_CANTBSEL to MSCAN_CANTARQ.
The peripheral is so mature I'm certain I'm doing something wrong. Do you know if any detailed app notes for the MSCAN survived the transition from Motorola?