hi everyone
After I added the FreeRTOS module, there were issues with my LPSPI transmission,What is the reason for this?
I perform SPI transmission on external Flash, and the code can run normally without FreeRTOS. When FreeRTOS is added, the code will make an error at the command being transmitted.Why?
Solved! Go to Solution.
Hi,
what about to increase heap size in FreeRTOS component?
Or share simplified project showing an issue.
BR, Petr
Hi,
did you try to initialize LPSPI driver within some init task after scheduler is started?
BR, Petr
Hi Petr
I did not initialize LPSPI in task scheduling, just like SDK v4.0 freertos_s32k144 demo use prvSetupHardware() function Initialize LPSPI .Start SPI communication after initialization, using LPSPI_ DRV_ The MasterTransferBlocking function will report an error.
My phenomenon is that after adding the freertos module, my SPI transfer function will directly report an error.
Best Reagrds
Hi,
you should call init and send functions from task after scheduler is started.
BR, Petr
Hi Petr
Thank you for your reply. I seem to have found the cause of the problem, The SemaWait() function was called in the LPSPI_DRV_MasterTransferBlocking() function.When the freertos module was not added, this function exists in osif_baremetal. c. However, after adding freertos, it will jump to osif_ Freertos. c, this may be the reason why the function cannot run, but I haven't found a solution yet. Do you have any ideas?
Best Regards
Hi,
what about to increase heap size in FreeRTOS component?
Or share simplified project showing an issue.
BR, Petr
Hi petr
Thank you for your answer. I have solved this problem and can only achieve SPI transmission in task scheduling.
Beat Regards