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。
已解决! 转到解答。
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
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
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...
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
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.
BR,chengsz
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