Can Receiving (ROM API) does not work after EPASS [SOLVED]

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by chrta on Sun Feb 01 13:18:09 MST 2015

i am writing a firmware for the LPC1549 using the C_CAN ROM API. Usually it works fine.

But when i disconnect the CAN cable (EPASS) and reconnect it, my CAN receive callback is not called anymore.

In my case i am sending CAN messages every few microseconds, no problem so far. I am receiving a few CAN messages every second.

When i disconnect the CAN cable i get an error in my CAN_error callback with the value 0x22 -> ERROR_ACK und ERROR_WARN.
I never get the BOFF error. The value of C-CAN0 STAT register at this time is 0x63 (EWARN, EPASS and ACKERROR).

But when i reconnect the cable the state (C-CAN0 STAT register) the value is directly after sending the first message (in the TX callback handler) 0x58 (EWARN, RXOK and TXOK).
I would expect that my CAN_rx callback will be called again, but it is not. The CAN_tx is called as expected.
In the following calls to the CAN_tx, the value of STAT changes to 0x18 (RXOK and TXOK).

What do i have to do to recover from EPASS, so that my CAN_rx callback is called again?

Regards and TIA,