2376893_en-US

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

2376893_en-US

2376893_en-US

Can box can' t detect can signal when runing S32K344 WB's "s32k3_wb_can" project

Hello, 
       I am porting S32K344 WB's "s32k3_wb_can" project code to my project. The CAN0's TX and RX pin is same with the WB's design(CAN0_RX: PTA6 and CAN0_TX: PTA7 ). The CAN0 work in CAN Classic mode, but the CANBox can't detect any CAN signal.

       I try to debug the "s32k3_wb_can" project,  and find "CAN0_ISRCallback" function is never called. I check the s32k144 demo code, it seems the "CAN0_Callback_Func" function is called and installed with "CAN_InstallEventCallback(&can_pal0_instance,&CAN0_Callback_Func,(void*)0);", but S32K344's "s32k3_wb_can" project seems no such install procedure.

        I have no S32K344 WB board, so I can't verify the WB's real running status. I want to know how to let the can0 run in "s32k3_wb_can" project.

       The attachment is my project "s32k3_wb_can.zip". To decrease the project size, I remove the "Debug_FLASH" subfolder. My can is sample 8-pin can chip and the STB is default low, so I only manipulate CAN0_RX/CAN0_TX. Please help me check what's the problem. Thanks.

Re: Can box can' t detect can signal when runing S32K344 WB's "s32k3_wb_can" project

Hi @Jimmybai,

The CAN0 work in CAN Classic mode, but the CANBox can't detect any CAN signal.

Could you clarify what do you mean by this? Is CAN Classic working, but CAN FD not? Or how are you confirming CAN Classic functionality.

I try to debug the "s32k3_wb_can" project, and find "CAN0_ISRCallback" function is never called. I check the s32k144 demo code, it seems the "CAN0_Callback_Func" function is called and installed

You can use the following APIs to enable FlexCAN's IRQ and handler:

IntCtrl_Ip_EnableIrq(FlexCAN0_1_IRQn);
IntCtrl_Ip_InstallHandler(FlexCAN0_1_IRQn, CAN0_ORED_0_31_MB_IRQHandler, NULL_PTR);

However, this should already be enabled by the initialization of the IntCtrl driver you are doing:

retCode = IntCtrl_Ip_Init(&IntCtrlConfig_0);
retCode = IntCtrl_Ip_ConfigIrqRouting(&intRouteConfig);

Callback installation is done within FlexCAN's initialization, to whichever callback you've declared:

Julin_AragnM_0-1780594748273.pngJulin_AragnM_0-1780594748273.png

Another reason your callback is never triggered may be that no valid Rx frames are being received. Have you tried scoping the CAN bus through an oscilloscope?

Instead of testing the wb_can example, have you tried using FlexCAN_Ip_Example_S32K344 included in RTD package? 

Or some of the examples shared in community:

Best regards,
Julián

Re: Can box can' t detect can signal when runing S32K344 WB's "s32k3_wb_can" project

By the way, the example project come from S32K344 WB's example folder---S32K344_Whiteboard_Example(LLD)_RTM_1.0.0

标记 (1)
无评分
版本历史
最后更新:
‎06-05-2026 04:38 AM
更新人: