CAN0 not work,CAN1 is ok

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

CAN0 not work,CAN1 is ok

跳至解决方案
2,472 次查看
chengsz1206
Contributor II

My mcu is S32K144_100lqfp。

CAN1 can work correctly。CAN1‘s transmission&reception is OK。

But CAN0 can not work。CAN0‘s TX can not ouput waveform。CAN0->ESR1 is always 0x00000000。

CAN1’s source code is similar with CAN0。

The source code is CAN0_Code.xlsx。

1 解答
2,173 次查看
PetrS
NXP TechSupport
NXP TechSupport

So if you see periodically transmitted message with TX/RX connection, then CAN0 config is correct and there must be something with transceiver. Try to connect CAN0 to second transceiver.

BR, Petr

在原帖中查看解决方案

8 回复数
2,172 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

do you have transceiver enabled? Try to disconnect it and connect just TX/RX pins together and send a message. You should see CAN message transmitted still. This way you check if pins are properly configured. If there is no message visible, then you can have wrong CAN module initialization, but I do not see an issue from the code.

BR, Petr  

0 项奖励
回复
2,172 次查看
chengsz1206
Contributor II

Hi, 

Thanks for your reply。

CAN0’s  transceiver is TJA1051,

CAN1‘s  transceiver is TJA1043。

If  TJA1051 is enabled,CAN0's TX  can not output waveform。

If CAN0 disconnect with TJA1051, CAN0's TX also can not output waveform。。。。。。

If  TJA1043 is enabled,CAN1's TX  can output waveform。It is OK。

If CAN1 disconnect with TJA1043, CAN1's TX also can output waveform。It is OK。

 I just went absolutely bonkers...

0 项奖励
回复
2,172 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

so disconnect transceiver and keep TX/RX connection. Then share FlexCAN registers content after CAN init is done and after message is transmitted. It could be great to measure TX/RX line with a scope too.

BR, Petr 

0 项奖励
回复
2,172 次查看
chengsz1206
Contributor II

Hi,

Thanks for your reply.

"so disconnect transceiver and keep TX/RX connection. "

→Is your meaning as follow?

S32k144‘s TX connect with TJA1051’s TX,

Rx connect with TJA1051's Rx.

But other line disconnet with TJA1051.

TJA1051.PNG

BR,chengsz

0 项奖励
回复
2,172 次查看
PetrS
NXP TechSupport
NXP TechSupport

No, just connect MCU's TX to RX. Transceiver is disconnected from TX/RX lines.

BR, Petr

2,173 次查看
chengsz1206
Contributor II

Hi,

Thanks for your reply.

CAN0's Tx can output waveform after  CAN0‘s Tx connect with Rx。

And then, what can I do?

BR,chengsz

0 项奖励
回复
2,174 次查看
PetrS
NXP TechSupport
NXP TechSupport

So if you see periodically transmitted message with TX/RX connection, then CAN0 config is correct and there must be something with transceiver. Try to connect CAN0 to second transceiver.

BR, Petr

2,173 次查看
chengsz1206
Contributor II

Hi,

Thanks very much。

Your reply helped us a lot。

This post closed。

BR,chengsz

0 项奖励
回复