2021-10-29 06:00 PM
Hello Everyone,
I have an STM32H7 interfacing with an SD card Using FatFs. I am using the cube ide, latest drivers etc. (embedded packages version 1.9.0) (FatFs Middlewhere version: R0.12c)
I am facing an issue where sometimes (50% of the time?) The Card Does not apear to initialize when I boot up the board.
There are 2 problems I see, the 1st:
My current hack way of handling this is to reboot the entire board until non of these startup errors happen. Which for whatever reason sometimes there are no errors and things run fine.
I am using the DMA template for FatFs, and Hardware Flow Control Enabled. Any Ideas on why this sometimes would fail? My MMC clock rate is 40mhz. Everything is 3.3v. I have tried lower clock rates but that does not seem to help.
Power Cycling does not always start correctly either.
Thanks for any Ideas or help,
Trevor
2021-11-08 11:14 AM
These errors no longer occur when I use a more expensive SanDisk microSD. I was using a OLEVO microSD from AliExpress. So attributing this to bad sdcards.
-Trevor
2021-11-08 01:10 PM
The middleware is like 3-4 years old, and has known failure modes for large media. And while this is different to media or comms errors, should be reviewed.
2021-11-09 08:53 AM
Some (perhaps useful?) Data: I had tested about 10 of these OVEVO Cards. and the errors would happen for about 3 in 10. Sometimes I could get get one of these "non-working" cards to work again for a short time after a reformat. (and perhaps a cooldown?) But soon the same card would stop working again. I came to the conclusion that some of the cards just were not working (at least with this interfacing firmware). I don't have the cards any more.
2021-11-10 03:09 AM
I always think of the hardware first...
Connectors, how do they look on the card itself ?
Is the insertion compression good enough ?
Did you get the Card reader from Aliexpress ?
How many insertions is the Card Reader good for ?
and secondly the reset time.
I use a reset chip on every board, at least 140mS reset after 2.7V is the minimum I use.
Some boards I use 1 Second Reset
I have Zero issues on startup on all my boards.
Having said that, the card readers are still definitely flaky.
Inserting in and out sometimes to make it work.
I got those readers from Aliexpress.
That is ok for prototypes but not production.