2024-02-05 08:42 PM
Hello everyone in the community.
■What you are having trouble with :
→I tried to add a string to a text file saved in "microSD" using "f_write" of "FATFS", but the written content was not saved.
■Specific phenomenon:
→As shown in the PG below, the result of "f_write" is "FR_OK", and "byteswritten" also returns the number of written bytes, but no data is obtained even if "f_read" is performed.
When I checked the contents of the SD card, the written contents were not saved.
*The contents of the SD card were checked by stopping debugging after "f_close" processing.
*See PG below
*When I checked the contents of the file separately using only f_read, I was able to read it.
Solved! Go to Solution.
2024-02-06 05:02 PM
原因:SDIOCLK clock divide factorのデータ送信速度がSDIOバスの速度よりも速かったため。
対応策:SDIOCLK clock divide factorを10→20に変更するとfcloseすることが出来て、ファイルに文字列が追記されるようになりました。
2024-02-06 04:41 PM
"else if(__HAL_SD_GET_FLAG(hsd, SDIO_FLAG_TXUNDERR))" in the "HAL_SD_WriteBlocks" function in the "f_close()" process was returning an error.
The problem is not resolved.
2024-02-06 05:02 PM
原因:SDIOCLK clock divide factorのデータ送信速度がSDIOバスの速度よりも速かったため。
対応策:SDIOCLK clock divide factorを10→20に変更するとfcloseすることが出来て、ファイルに文字列が追記されるようになりました。