FlexCAN Not Transmitting on S32K3X4EVB-Q172

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

FlexCAN Not Transmitting on S32K3X4EVB-Q172

跳至解决方案
2,216 次查看
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).

标记 (2)
0 项奖励
回复
1 解答
2,137 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport
4 回复数
2,138 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport
2,020 次查看
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 项奖励
回复
2,127 次查看
gormae1
Contributor II

Thank you!

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

0 项奖励
回复
2,178 次查看
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