Can't solve MCUX SDHC driver crashing in FreeRTOS.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Can't solve MCUX SDHC driver crashing in FreeRTOS.

954件の閲覧回数
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 返信

743件の閲覧回数
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 件の賞賛