Skip to main content
efe_electronica
Associate II
September 16, 2024
Question

Riverdi SDMMC1 FR_NOT_READY error

  • September 16, 2024
  • 2 replies
  • 1670 views

 I am encountering the FR_NOT_READY and FR_INVALID_OBJECT error when trying to mount the SD card and write a file in RVT101HVSFWCA0 Riverdi display. Could you please advise on how to resolve these issues?

2 replies

Andrew Neil
Super User
September 16, 2024

Have you asked Riverdi ?

https://riverdi.com/contact 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
Technical Moderator
September 16, 2024

Hello,

According to the examples provided under https://github.com/STMicroelectronics/STM32CubeH7/blob/master/Projects/STM32H745I-DISCO/Applications/FatFs/FatFs_Shared_Device/CM7/Src/main.c

I don't see that you linked the driver using  FATFS_LinkDriver().

 

 if(FATFS_LinkDriver(&MMC_Driver, MMCPath) == 0)
 {
 /* ..... Some code before */
 FS_FileOperations();
 }
}

static void FS_FileOperations(void)
{
 FRESULT res;
 uint32_t byteswritten, bytesread;

 /* Register the file system object to the FatFs module */
 if(f_mount(&MMCFatFs, (TCHAR const*)MMCPath, 0) != FR_OK)
 {
 goto error;
 }
 /* Some code after ... */

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
efe_electronica
Associate II
September 16, 2024

I reviewed the example you provided and corrected my code. The MX_FATFS_Init() function is executed before the StartCARDTask() function. Now I can mount the SD card but I still have the same error when using f_open() or f_write ().

efe_electronica_0-1726500500124.png

efe_electronica_2-1726500889060.png

 

 

mƎALLEm
Technical Moderator
September 16, 2024

Hello,

Please use </> button to show your code instead of sharing a screenshots of it.

What errors you get for these APIs?

What if you use the same example (as it is) from what I posted and adapt it to your Hardware (clocks+IOs)? do you get the same behavior?

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."