I would like to implement a very low power SD card handling with MSP430 processors. I would like to log measurement data onto SD card without a file system. I want to turn on and off the SD card power to save power. And I would like to reach as fast SD card initialization as I could.
To initialize the SD card I used the @vaxquis suggestion from this issue:
What is the correct command sequence for microSD card initialization in SPI?
It is working great, I can initialize the card, save the data and reload it if necessary.
BUT, after SD card power reset, before the ACMD41 command when I set the chip select signal to LOW, then the SD card will response 0x00 only after approx. ~50-80ms. During that time 0x01 is the response from the SD. So if I keep sending the ACMD41 continuously I got 0x00 response only after 50-80ms. OR, if I set LOW for CS and wait 50-80ms then I immediately got 0x00 response.
After the initialization, everything goes smoothly.
Any suggestion to my problem?
So my init sequence:
- Enable SD card VCC
- wait ~1ms
- start initialization (CS high + send 80 clock)
- CS LOW
- CMD0 (arg:0, crc:0x95) + wait R1 response
- CMD8 (arg:0x000001AA, crc:0x87) + wait R1 + arg echo response
- CMD55 (arg:0, crc:0x65) + wait response
- CMD41 (arg:0x40000000, crc:0x77) + wait response
- repeat ACMD41 (CMD55 + CMD41) until 0x00
- CS HIGH
- ... write, read data ...
- wait ~ 1ms
- disable SD card VCC
- sleep ~800ms
- start again
If the SD card power is not switched, this issue does not appear.
And I am using an 8GB SDHC Ver2.0 card.