FlexCAN Not Transmitting on S32K3X4EVB-Q172

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

FlexCAN Not Transmitting on S32K3X4EVB-Q172

Jump to solution
1,593 Views
gormae1
Contributor II

Hello,

I am trying to test the functionality of the FlexCAN peripheral on the NXP S32K3X4EVB-Q172. The NXP provided-example (FlexCAN_Ip_Example_S32K344) is configured in loop-back only mode, but I would like to test actually sending messages over the CAN bus.

I've tried out the various example projects posted on this thread: https://community.nxp.com/t5/S32K/FlexCAN-IP-example-not-running-in-normal-mode-on-S32K344-EVB/m-p/1... but each of the projects trigger a bus shut off (i.e. BOFFDONEINT = 1b). I did notice that that thread was in reference to an NXP TJA1153 transceiver, whereas the transceiver on my board appears to be an NXP TJA1043 (not sure if this makes a major difference).

Anyway, stepping through the driver code (in debug mode) in the FlexCAN_Ip_SendBlocking() function reveals that FlexCAN_StartSendData() runs successfully (it returns FLEXCAN_STATUS_SUCCESS), but the transmission always timesout in the following while-loop which waits for transmission (i.e. timeElapsed >= mS2Ticks).

Is there perhaps something obvious I'm missing? Like a jumper that needs to be configured or some other hardware pre-condition? I've tried testing by hooking up CANH_OUT (as well as CAN0_TX) to an oscilloscope, as well as using CANoe, but nothing appears on either.

I've attached all my version info in case it's relevant (see ver_info.txt), as well as a snapshot of the contents of the FlexCAN 0 peripheral registers (see can_reg_snap.txt).

Tags (2)
0 Kudos
Reply
1 Solution
4 Replies
1,515 Views
Robin_Shen
NXP TechSupport
NXP TechSupport
1,397 Views
Macar
Contributor III

I also have a related issue, FlexCAN_Ip_SendBlocking function hangs when PCAN and debugger are connected. When I disconnect the debugger, this function absolutely doesn't get stuck and everything works fine. What is the reason?

0 Kudos
Reply
1,504 Views
gormae1
Contributor II

Thank you!

This example does indeed work, both under an oscilloscope and under CANoe.

0 Kudos
Reply
1,555 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

The CAN PHY on S32K3X4EVB-Q172 is TJA1043, but it is TJA1153 on S32K3X4EVB-Q257 and S32K3X4EVBQ257ND. Due to CAN PHY differences, you cannot directly use the various example projects posted on that thread.

Best Regards,
Robin