2023-08-31 12:42 AM
Hi ,
I made a STM32F405VGT6 board with SD card interface. The SD code is generated using STM32CUBEMX and FatFs middleware.
The SD file write is not stable, it return error sometimes after calling f_write(). However, if I run the same code in uVision debug mode with SWD/ST-LINK connected, the f_write() became very stable.
What could be the difference between with debug mode and without debug mode that causing f_write unstable ? I guess it may be caused by some hardware timing that is too fast without the debug mode. Where can I add delay in the code that simulate the timing of debug mode ?Thanks.
Martin
Solved! Go to Solution.
2023-08-31 02:28 AM
This is some good quality example
2023-08-31 01:14 AM
Writing to the SD card is associated with a large consumption, especially when erasing blocks. Most of the problems are associated with insufficient power supply of the card and insufficient blocking of the supply voltage. The problem may not manifest itself in debug mode, because the writes are slower and the capacitors in the power supply are enough to cover them.
2023-08-31 01:58 AM
Hi ONadr,
Thanks for your prompt reply. Could you explain more about "insufficient blocking of the supply voltage" ? How can I increase blocking of the supply vpltage ? I can not catch the meaning of "blocking" for supply voltage. Thanks.
Martin
2023-08-31 02:19 AM
2023-08-31 02:28 AM
This is some good quality example
2023-08-31 05:19 PM
Hi ONadr,
Thanks. This did help a lot.
Martin