AnsweredAssumed Answered

How to use CAN drivers with FreeRTOS?

Question asked by Rick Cordray on Oct 12, 2018
Latest reply on Oct 25, 2018 by Rick Cordray

In order to use CAN with FreeRTOS, I have replaced the interrupt handler with my own that includes a semaphore for task switching.  I've modified the function MCAN_TransferCreateHandle in fsl_mcan.c in the SDK as follows:

 

//s_mcanIsr = MCAN_TransferHandleIRQ;
s_mcanIsr = can_TransferHandleIRQ_FreeRTOS;

 

I also have added the header for my code file to fsl_mcan.c.  I'm doing this because s_mcanIsr is defined within the module as a static variable and is used by other driver functions.  I really want to do this in a way that does not modify the fsl_mcan driver.  Is there another way to do this without modifying the driver?

 

Thanks,

 

Rick

Outcomes