Skip to main content
SLesh.1
Associate II
August 4, 2020
Question

STM32L476RC microSD mmc FATFS problem

  • August 4, 2020
  • 1 reply
  • 991 views

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.
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 4, 2020

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

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