2022-08-18 07:57 AM
in fact i m trying to read and write data on SD card through an adpter using FREERTOS ,spi and fatfs .I m using stm32F767ZIT6
the debugger return FR_OK for f_mount when it s put with 0 option and not working for 1 option.
the prblms is that even when i try to take the SD card from the adpter it returns the same thing for f_mount (FR_OK) and for the functions after it ;they are not working for exemple: f_open always return FR_NOT_READY
so i dont know if it s hardware prblm or something with the drivers !!
i m even doubting a clock prblm but i couldn 't fix it and really don t know why ( i m just adding that there's no prblm with the adapter because i tried it with an arduino program and it s working to say that i found the file opened and written )
so i m stuck trying to find the prblm :(
2022-08-18 09:12 AM
>>i dont know if it s hardware prblm or something with the drivers
So, instrument at the DISKIO level where you interact with the SPI, debugging via errors at the top-level will get you nowhere.
For FR_NOT_READY check if it's using a GPIO on the SD socket, or otherwise reporting status / stat