FlexCAN on S32K118 cannot SYNC up with CAN Bus

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

FlexCAN on S32K118 cannot SYNC up with CAN Bus

821 Views
hoangtueminh1407
Contributor I

Hi NXP Support Team and the community,

I'm currently configuring CAN Stack Communication in S32K118.

I also use the UJA1169ATK_X_F as the CAN Transceiver.

I have sent out a message via CANoe Simulation and already observed the message on RX pins by using Oscilloscope. However the message are not acknowledged by the CAN Controller.

As a result of checking the initialization phase, there are not any FRZ, HALT, MDIS, NOTDRY existing but the CAN0_ESR1->SYNC bit are set as 0. It's seem the CAN Controller are in the normal working mode but it doesn't participate on the bus. I have check the connect between CAN Controller and the CAN Transceiver, the CAN Transceiver and the bus, everything works well.The CAN Controller cannot send / receive any message on the CAN Bus.

I have two questions about this:

- Is there any possibility leading to that wrong behavior ?

- Without the properly configure CAN Partial Network ( disabled it ), Could the CAN Transceiver normally works ?

Really hope the answer and instruction.

 

 

 

 

Tags (2)
0 Kudos
2 Replies

549 Views
zeekab
Contributor I

I recently had a similar problem using the FlexCAN on the S32G2, which I assume functions in a similar manner. I could not get anything to transmit on the CAN bus, and the SYNCH bit was never set. I realized that the controller may be in the "Bus Off" state, which was keeping it from moving into the IDLE state and then allowing for transmission. You either have to handle this yourself in an ISR (reset the BOFFDONEINT bit in ESR1) or more conveniently on the S32G2 you can set up the CAN controller to handle bus off recovery automatically with the BOFFREC bit in CTRL1. Setting this allowed me to finally send CAN messages from my M7-core application. This bit is also set in the NXP Linux BSP FlexCAN driver (at least in the version I am using - NXP's "Auto Yocto BSP" v34 - it is).

zeekab_0-1675455289436.png

 

 

Hope this helps someone!

0 Kudos

800 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@huangtueminh1407

1.if you measure the Rx port waceform on the mcu side is correct ,please check the bitrate configuration,This should probably be a problem with your CAN configuration。

2.If only the CAN partial network function is disabled, the CAN transceiver can work normally.

0 Kudos