cancel
Showing results for 
Search instead for 
Did you mean: 

[H753 + FatFS + FreeRTOS] How to debug a hard to reproduce FS_DISK_ERROR?

CDiaz.2
Associate II

I'm currently porting a project from bare metal to FreeRTOS, I'm using SDIO 4bit bus as interface with an SD Card, the FatFS configuration is mostly the default one, I've only enabled the f_chdir function. Cache is not enabled.

I'm using the default task (with 10kB of stack, otherwise the FS doesn't mount), and after some f_read operations I'm getting an FS_DISK_ERROR, I've seen it failing when trying to read 32000 bytes from the audio file. I've tried to split those reads in two reads of 16000 bytes, but it fails as well.

I'm not that well versed on RTOS debugging (the application doesn't fail when running in bare metal for a couple of hours), so I guess I'm doing something wrong in the RTOS side.

Do you happen to know if there's a known issue with SDIO and RTOS or any tips on how to approach this problem?

Regards

1 REPLY 1

Hello @Community member​,

There are many examples provided in our firmware package using FatFS + FreeRTOS.

I recommend you to have a look at them and to take inspiration from them.

BeST Regards,

Walid