CAN messages lost in S32k146

cancel
Showing results for 
Search instead for 
Did you mean: 

CAN messages lost in S32k146

562 Views
juliana_rojas30
Contributor III

Hi community,

I am trying to implement a system for CAN FD communication with my s32k146. I'll need a payload of 64, so as I understand I can use a maximum of 7 MBs. 

The problem is that the echo stage of my system is losing a lot of messages. As I read here, the solution for this is adding more MBs to the transmission stage, which I already did, but still getting a loss of messages of aprox 45% from the initial number sent to the board. 

Is there any other solution I can try for fixing this problem? 

Thanks! 

0 Kudos
4 Replies

558 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

which message is lost in the MCU, a received or transmitted one? For the RX messages, it can be simply lost if user does not handle respective MB in time, so can be overwritten by new matched message.

But for TX MB? If MB is configured for transmission, that MB is "waiting" until it is transmitted or aborted. Thus only loosing can happen due to user action. 

 

BR, Petr

0 Kudos

555 Views
juliana_rojas30
Contributor III

Hi @PetrS ,

Thanks very much for the response. The system works like this:

CAN tool -> Board : This part is ok

Board -> CAN tool : This is the part where the messages get lost.

In my CAN tool I only get to see a little bit more than 50% of the initial messages sent to the board. 

When you say " it can be simply lost if user does not handle respective MB in time, so can be overwritten by new matched message." Does it mean that the timing configuration might be wrong?

0 Kudos

533 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

 

as I wrote within Case you entered, I guess you simply have less time to do a echo on the MCU.
You need to read received message and prepare echo message into TX MB before new RX message is received. Ideally this could be done before next message is sent by CAN tool, so you will have immediate echo. 
You can try to decrease rate at which CAN tool is sending a messages. Just to know CAN FD is working too. I guess with lower rate you should not lose any echo message. If this will work , then it is application problem, to do all things in time.

Regarding CAN bit time setting; you should set the same bitrates and sample points on MCU and CAN tool, otherwise communication cannot work and you will see errors detected on both MCU and CAN tool.
 

 

BR, Petr

0 Kudos

443 Views
juliana_rojas30
Contributor III

Hello @PetrS ,

I did as you said and I keep getting the same loss of messages, so, before the baud rate of the data phase was of 2000 and now I tried with 1000 and 500 and I keep getting the exact same loss %.. Is it possible for me to use more MBs in any way?

I ask because I tried with smaller messages (i.e. messages which maximum DLC=13), so I could use more MBs and it still losses messages but it's a smaller quantity.

Kind regards 

0 Kudos