S32K344 CAN Trans Error

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

S32K344 CAN Trans Error

Jump to solution
476 Views
RegulusCheng
Contributor III

Hi, NXP friends

I am working with S32K3X4EVB-Q172(Part of MCSPTE1AK344), using simulink in matlab 2021b.

I have problem trying CAN trans Demo of MBDT:

I use CAN FD transmit EBT example, the board's CAN0H/CAN0L is connected to an USB-CAN device. After build and download, the RED_LED lights up, which shows there is an can error.

I have set the board config to S32K344-172,and other demos like Dio is working right. I wonder if the TJA1153_init is not set correctly. I am sure the EN/STB/ERRN pins are right, but I am not sure what should be write into the canExdHwId.  I have tried 6 (default value), and 4(Interrupt/CanObjectId - 4 ), 3 (Polling/CanObjectId - 3 ) accoring to this thread:how to use MBDT to initialize the TJA1153 CAN on ... - NXP Community  ,but still not work.

Considering the reply speed,  I ask this question in case someone know the reason and can give me some suggestion. Tomorrow I will try to get error Info through the FreeMaster (Sometimes the  Software just can not open, and may need rebot the computer)

Hope someone can give me some suggestions, thanks!

RegulusCheng_0-1705407631057.pngRegulusCheng_1-1705407663502.png

RegulusCheng_2-1705407696285.png

 

 

Regulus Cheng

0 Kudos
1 Solution
458 Views
RegulusCheng
Contributor III

After one-day rest, the problem solved ifself: the bule LED blinks and I can receive the message board sent.

It's wired because I didn't change anything today, just power up the board and then receive the message correctly (I tried to shut down and power up the board yesterday, too). 

It shows that my configuration yesterday is right: the canExdHwId should be set to 3, whitch is the "Polling/CanObjectId - 3" in configuration file. But I don't know why should be this because I chose "CanHardwareObject_Can0_Tx_Interrupt" in CAN write model, not "CanHardwareObject_Can0_Tx_Polling". Why canExdHwId should be 3, not 4 (Interrupt/CanObjectId - 4)?

 

View solution in original post

0 Kudos
3 Replies
459 Views
RegulusCheng
Contributor III

After one-day rest, the problem solved ifself: the bule LED blinks and I can receive the message board sent.

It's wired because I didn't change anything today, just power up the board and then receive the message correctly (I tried to shut down and power up the board yesterday, too). 

It shows that my configuration yesterday is right: the canExdHwId should be set to 3, whitch is the "Polling/CanObjectId - 3" in configuration file. But I don't know why should be this because I chose "CanHardwareObject_Can0_Tx_Interrupt" in CAN write model, not "CanHardwareObject_Can0_Tx_Polling". Why canExdHwId should be 3, not 4 (Interrupt/CanObjectId - 4)?

 

0 Kudos
444 Views
robertv
NXP Employee
NXP Employee

Hello @RegulusCheng ,

The TJA_1153 requires a complete disconnection from power supply and reconnection and it definitely seems unusual that it did not work the first time you tried it. I must mention that a reset using the button on the board is not enough to get the TJA_1153 to switch to the normal operating mode.   

To answer the second question, the mechanism of sending CAN messages is based on interruptions, thus the hardware object chosen for the Can_Write block is the one that is enabled for interrupts.

As for the other hardware object, it is used to communicate with the TJA_1153 transceiver with the purpose of selecting the operating mode. 

Regards,
Robert V

0 Kudos
429 Views
RegulusCheng
Contributor III

Hi, Robert V

Thanks for your explanation, it is very useful for me to understand the mechanism! I

have another problem using FreeMaster. I will try to solve it today, and if I fail, I may ask for your help tonight in another thread

Regards, 

Regulus

0 Kudos