Hi~:
I use microsd card on nrf21540, the sd card mounted success and write file success, but after some time ,I found write error.
And this issue can be reappeared. Can you give me some suggession.Thanks!
I use the ncs V1.9.
Hi~:
I use microsd card on nrf21540, the sd card mounted success and write file success, but after some time ,I found write error.
And this issue can be reappeared. Can you give me some suggession.Thanks!
I use the ncs V1.9.
Hi,
Are you using a nRF21540 DK, or a custom board with this chip? I assume that the SD card is connected to the nRF52840 and not nRF21540?
How is the SD card connected to the chip?
Can you post your prj.conf and overlay files?
Can you check if setting the log level of the SDMMC library to DBG reveals more details about the failure?
Best regards,
Jørgen
Is the SD card mounted in an external SD card socket? If so, what kind of socket? Is the socket soldered to the board, or connected through jumper wires/breadboard?
Do the error occur at a specific file/point in application, or at a specific time, or does it happen at random?
Have you tested if the latest nRF Connect SDK v2.1.0 release have the same issue?
Hi,Jorgen.
Is there any progress,I can be sure that the IO port is fine, but can not guarantee the quality of the wiring.
I want know is there any successful case?
I update ncs to V2.1.1, this issue remains.The sd card is mounted OK,and can write some data to sd card, but fs_sync costs about 10 seconds and return -5.
I tried running your sample, but the main.c file is using some decoding that my system can't understand, or it is somehow broken. Can you re-upload the sample you used for testing in nRF Connect SDK v2.1.1? I can then try to reproduce it on my end.
O, sorry, the main.c is encrypted.Please try again.4454.sample.zip
andy said:I update ncs to V2.1.1, this issue remains.The sd card is mounted OK,and can write some data to sd card, but fs_sync costs about 10 seconds and return -5.
I believe that the 10 seconds comes from CONFIG_SD_DATA_TIMEOUT, which by default is set to 10 seconds.
The reason that fs_sync did not give this error before is likely that the support for this was not added until recently, see this pull request.
I have still not found the root cause for the error though, would need to check that further.
andy said:I update ncs to V2.1.1, this issue remains.The sd card is mounted OK,and can write some data to sd card, but fs_sync costs about 10 seconds and return -5.
I believe that the 10 seconds comes from CONFIG_SD_DATA_TIMEOUT, which by default is set to 10 seconds.
The reason that fs_sync did not give this error before is likely that the support for this was not added until recently, see this pull request.
I have still not found the root cause for the error though, would need to check that further.
I disable this code, then continue write data to sd card is OK,and no data lose.Is there any problem with the "check the status of the sd card"
Any news on that? I have the same problem with V2.1.2. Did you face any issues after disabling that line?
I have not update to V2.1.2,there is no issue now. you can try it. How I hope the next version solves this issue.
I tried commenting out the line. It worked for a while. After a couple of minutes (completely random), it messes up the i2c communication. For now, I'm just using a low timeout. I hope it will be fixed real soon.
Hi,
very interesting!
any news findings regarding the root cause of that error?
Thanks!