S32K344 CAN Trans Error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

S32K344 CAN Trans Error

ソリューションへジャンプ
611件の閲覧回数
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 件の賞賛
返信
1 解決策
593件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
594件の閲覧回数
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 件の賞賛
返信
579件の閲覧回数
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 件の賞賛
返信
564件の閲覧回数
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 件の賞賛
返信