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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,023 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by chrta on Sun Feb 01 13:18:09 MST 2015
Hello,

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,
Christian
Labels (1)
0 Kudos
Reply
3 Replies

984 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by chrta on Mon Feb 02 11:18:04 MST 2015

Quote: chrta

Maybe i did something wrong with the message objects for TX and RX. I am using all 32 objects for TX and RX. I come back after testing if changig this fixes it.


After only using 4 message objects for TX, it works fine. I can receive messages after EPASS :bigsmile:

I assume that the message objects i use for RX and TX should not overlap.
0 Kudos
Reply

984 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by chrta on Mon Feb 02 11:08:34 MST 2015
Thank you for your fast answer R2D2.


Quote: R2D2

EPASS is not BUS OFF. So after reconnecting your node to a working CAN it should decrease error counters and switch off errors / warnings again.


This works fine, my only problem is that my CAN_rx callback is not called.


Quote: R2D2

If you don't receive messages I would recommend to check your CAN: is this message still transmitted or did the transmitting node stop to transmit meanwhile  :quest:



There are messages on the CAN. Maybe i did something wrong with the message objects for TX and RX. I am using all 32 objects for TX and RX. I come back after testing if changig this fixes it.
0 Kudos
Reply

984 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Feb 01 16:27:24 MST 2015

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



Nothing  :)

EPASS is not BUS OFF. So after reconnecting your node to a working CAN it should decrease error counters and switch off errors / warnings again.

If you don't receive messages I would recommend to check your CAN: is this message still transmitted or did the transmitting node stop to transmit meanwhile  :quest:   
0 Kudos
Reply