s32k flexcan failed

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

s32k flexcan failed

628 Views
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 Kudos
Reply
3 Replies

572 Views
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 Kudos
Reply

506 Views
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 Kudos
Reply

579 Views
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 Kudos
Reply