2020-04-22 01:24 AM
Dear all,
I was trying to verify STM32F479 and STM32L476 microcontrollers compliance with SD memory card version 3.0. Both reference manuals state "Full compliance with SD Memory Card Specifications Version 2.0".
Using HAL functions provided by ST I have done some tests to initialize a micro SD version 3.0 and I have noticed that SDIO initialization function return an error status. However I have ignored this error and the subsequent read and write operations to micro SD memory card have worked correctly anyway. This is the list of calls to initialization functions that returned an error status:
I would like to know if it's safe to ignore this error and why read/write operations work despite the initialization error.
Best regards,
Massimo Gallon
2020-04-22 06:47 AM
> I would like to know if it's safe to ignore this error
Generally it's a bad idea to ignore errors if you don't know the cause. HAL_ERROR isn't getting returned for no reason. Looks like you traced the source of the error nicely.
> why read/write operations work despite the initialization error.
If setting 4 bits fails, could be working if it's still configured in 1 bit mode.
The 2.0 vs 3.0 shouldn't be an issue. The commands you're using should all be in the 2.0 spec, which 3.0 is backwards compatible with. Almost certainly a HAL or code issue. Just a guess.
2021-09-21 06:45 AM
Hello,
I have the same problem, but the error does not always occur.(sometimes occured). when I ignored error , read and write operations to micro SD is working . Did you solve the problem?
2021-09-21 07:06 AM
Hi,
not really, I'm working with SD card version 2.0 and I have left aside version 3.0. I didn't find any answer to this issue. I have tried updating STM HAL library for STM32L4 and STMF4, but nothing has changed. Anyway, in the project I'm working on I had to freeze the STM32F4 HAL version to 1.24.0.
2021-09-21 07:58 AM
How can i back to SD card version 2.0?
2021-09-21 11:40 PM
I'm not sure I understand your question, I've simply decided to use SD card version 2.0 in my project. It depends on the SD card you want to use, whether it supports 2.0 or 3.0 specification. Keep in mind that 3.0 is backward compatible with 2.0, but STM32F4 and STM32L4 are not compliant with SD memory card 3.0.
2021-09-21 11:46 PM
thanks for the reply, I mean how can ı check my sd card version? I 'm using sandisk edge 8gb micro sd(class 4).
2021-09-22 12:16 AM
The link below should answer your question. I think your SD card is version 2.0. Anyway, if you want to be suere you can check the notes of the producer of the SD card.