Hi All,
I am using microSd(SDHC) for data storage. I a using MSP430BT5190 MCU for communication. Initially everything works fine. For every second i have to write 2048 bytes data to the sd card. I am making data into four 512 blocks and writing to the sd card. I am not using any file systems. I am writing data directly to the sectors also also maintaining one reserved sector for house keeping variables. For each block write or read i am providing 60ms time gap.
My problem is:
After few hours sd card is not able to write the data. CMD24 always responding with 0xFF. I will keep trying for every 60ms. After 10 attempts i will re-boot the device(Software reset). After reset sd card never initialize until i remove the battery and keep it back.
Also i need few clarification
What is the time gap between two successive writes or read? (Using 8GB class 4 microSD)
Is there any command to Format the sd card?
some times single read block is giving the junk data. second or third attempt it will works fine. why? (using DMA)
Note: While sd card initialization SPI clock speed is 1mhz and after initialization i am increasing the SPI clock speed to 20mhz.
Please give me some advice..
Thanks!