cancel
Showing results for 
Search instead for 
Did you mean: 

f_write is returning with disc error

SKris.1616
Associate II

Hi,

#FatFS​ #SDIO​ #STM32CubeIDE​ 

In STM32CubeIDE f_open and f_read is returning with FR_OK value. but when I used f_write with some data I am seeing that the return value is DISK_ERR. In this case file is not at all getting created in the SD card.

While looking into further, I am seeing some DCRC error flag is set due to this I am seeing DISK_ER.

Can anyone help with this?

Regards,

Suresh.

2 REPLIES 2
dbgarasiya
Senior II

debug code and find exatly where you failed ?

dbgarasiya
Senior II

have you find error where you get stucked?