cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L476RC microSD mmc FATFS problem

SLesh.1
Associate III

I've strange problems with my custom board with microSD card:

  1. The same code doesn't work if I run debug build and works well if I flash the realise. It gives error CRC. And the error is the same if I remove the card. It looks like that response did not received from card via MMC or MMC driver. But the same code works in realise build. I'm using CubeIDE 1.4.0 with autogenerated code from CubeMX. And it can work in debug mode if I set 1-bit MMC (4-bit doesn't work). 1 and 4-bit MMC works in release.
  2. My code reads one file (config) and writes other one (log) every 5 seconds and goes to standby mode. It works well, but a few hours late no files on SD card... File system is Ok. f_mount() works. But my device shows me that no config file to reading... If I insert Card to PC - it is empty.
1 REPLY 1

Probably code is not optimized, and read/write FIFO stuff is polled and slow

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..