CAN0 not work,CAN1 is ok

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

CAN0 not work,CAN1 is ok

Jump to solution
1,881 Views
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 Solution
1,582 Views
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

View solution in original post

8 Replies
1,581 Views
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 Kudos
Reply
1,581 Views
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 Kudos
Reply
1,581 Views
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 Kudos
Reply
1,581 Views
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 Kudos
Reply
1,581 Views
PetrS
NXP TechSupport
NXP TechSupport

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

BR, Petr

1,582 Views
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 Kudos
Reply
1,583 Views
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

1,582 Views
chengsz1206
Contributor II

Hi,

Thanks very much。

Your reply helped us a lot。

This post closed。

BR,chengsz

0 Kudos
Reply