Missing CAN messages during transmission

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

Missing CAN messages during transmission

1,645 Views
b_mansoor
Contributor I

HI,

In my application program, I am transmitting many CAN messages in different timings. I have 1ms, 10ms, 100ms and 1000ms timers. In each timing I am transmitting 5-6 CAN messages with different CAN Ids. 

But while testing, I could see some messages are missing some times. For example, 100ms messages stops for 1-2 sec (Not all messages in 100ms, only 1 or 2 stops) and then it is starting again. 

How can I resolve this issue? how to implement FIFO registers to solve this?

Labels (1)
Tags (1)
0 Kudos
1 Reply

1,599 Views
Jeremy_He
NXP Employee
NXP Employee

Hi Mansoor,  

Are you using the same MB for sending all the CAN messages, our S32K chip has 16 or 32 MBs for each CAN instance. You can config more MBs for TX.  CPU sending data to the MB is much faster than data sent from MB to the CAN bus.

Below is a reference code for using 10 MBs(MB0~MB9) for TX.

CAN_Send(&can_pal1_instance,CAN1_TxMB++%10, &sentMsg);

FIFO in our chip is used for RX only.

Best wishes.

Jeremy

0 Kudos