s32k flexcan failed

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

s32k flexcan failed

1,890 次查看
bjs
Contributor III

I am working on flexcan hscan mode with s32k118evb. 

I created a demo project based on can_pal_s32k118 and it worked well. But after I add the hscan code  to a FreeRTOS based application the CAN interface doesn't work. The result from CAN_GetTransferStatus is always STATUS_BUSY. 

Is this issue related to FreeRTOS? Please help it's for a production project

Regard,

Bruce

 

 

 

0 项奖励
回复
3 回复数

1,834 次查看
bjs
Contributor III

I sent you the source code. 

I'll try the the method mentioned from above link and let you know the result.

Regards,

Bruce

  

0 项奖励
回复

1,768 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

I did not try your code on EVB yet, but seems you are calling HSCan_Init twice, first in prvSetupHardware then in rtos_start as well.
Also you should increase heap in Freertos setting, I think.

BR, Petr

0 项奖励
回复

1,841 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

probably driver interrupt is not called prperly to update sattus variable, or frame is not send/received without error at all. Can you share your project?
BTW; some is posted at https://community.nxp.com/t5/S32K/Flexcan-porting-to-FreeRTOS/m-p/827465

BR, Petr

0 项奖励
回复