Can't solve MCUX SDHC driver crashing in FreeRTOS.

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

Can't solve MCUX SDHC driver crashing in FreeRTOS.

949 次查看
minibix
Contributor II

I am using the FRDM-K64F board, MCUxpresso SDK, FreeRTOS and the SDHC driver.

I created a new project and have a FRTOS task that initialises the SD card and attempts to write a raw block of data to it, I am using the code from the "xxxx_driver_examples_sdcard_sdcard_freertos" SDK example which runs fine if I build that project to the K64F.

In my new project, I am using an almost identical configuration as the example, yet my project crashes on a hard fault when attempting to write a block the SD card. SD card powers on and initialises fine.

I have attached the thread/stack frame list and highlighted the block of code where it crashes. I have tried many fixes with ISR priorities and heap/stack sizes, and even when I use the same config as the example, it still crashes.

The only major difference is that my project is C++ using NewLibNano, and the example project is C RedLib.

标签 (1)
标记 (4)
0 项奖励
1 回复

738 次查看
minibix
Contributor II

I've narrowed it down and found that it is a read operation causing the issue. SD_ReadBlocks seems to be causing the issue (in my project, but not the example project).

SD_WriteBlocks and SD_EraseBlocks work fine...

0 项奖励