CAN - Sporadic malfunction of sending CAN packets...

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

CAN - Sporadic malfunction of sending CAN packets...

345 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by capiman on Tue Jun 30 12:19:26 MST 2015
Hi,

I have code to send and receive CAN packets on CAN0 with Rev '-'.
I can send and receive multiple thousands of CAN packet (e.g. 50.000 packets),
but suddenly the sending of CAN packets is not working any more.
The bits in MSGV1 and MSGV2 don't tell me, that the buffer for the previous send packet gets free.
It remains endless filled (bit remains 0). I am using interrupts, no DMA (don't know if possible and useful at all).
For a test I enabled status interrupts, but get no error condition like CRC erros nor others.

I know the errata, the ADC0 is used in parallel to CAN0, but only in burst mode.
It is already set up before CAN and after init of CAN it executes only read requests.

I use msgNo = 1 for receiving, msgNo = 32 (=0x20) for sending.
Baudrate is 250 kbit/s, driven by XTAL of 12 MHz (without PLL). Core itself runs at (maximum possible) 204 MHz.
Core M0 is not used at the moment, perhaps later.

Does someone know such a problem? Any idea how it can be solved?

Because it occurs partly only seldom, but partly also very often, a first step could also be a workaround:
I periodically check this bit and can also detect via a timeout, when my problem situation happens.
But, as workaround, what can I do then? Is there some way to reset the transmission path only?
Clean up a transmitted packet?
Or am I forced to switch down complete CAN0 peripheral and re-initialize it?

Many thanks!

Best regards,

Martin


Labels (1)
0 Kudos
2 Replies

329 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by capiman on Wed Jul 01 01:50:14 MST 2015
Thanks for your answer. No, no overclocking, it is running at 12 MHz, directly from XTAL.
0 Kudos

329 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Wed Jul 01 01:18:29 MST 2015
Are you overclocking the CAN peripheral?  It should run at 50MHz at most, see the latest user manual.  We had sporadic failures when running it at 200 MHz.
0 Kudos