cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO driver

Ark1
Associate II

hi fellows, i'm developing the SD card application for STM32f429 discovery boards. i have the FATFS software with myself. my point i want to develop my own driver for SD card i don't want use HAL driver . i developed the initialization code for SD card. i didn't get the card response command and card status to my commands . i'm writing the CMD8 with argument (set voltage 3v3). but i didn't get response. i need to know the programming flow. i'm attaching my code along with this. so kindly help me to know better.

      SDIO->CLKCR|=(158<<0 | 1<<14);       // SDIO_CK sets to 300KHZ & Enalbe the Hardware flow control.
 
	SDIO->CLKCR|=(1<<8);                 // Enables the SDIO_CK 
	SDIO->CMD|=(1<<12 | 3<<9 | 7<<6 | 0<<0);  // send CMD0 to card, which makes software reset.
 
	SDIO->CMD|=(8<<0);                        // send CMD8 to card, set operation voltage.
	SDIO->ARG|=(0x190);                       // send argument with CRC code.

5 REPLIES 5

ORing every value into the registers seems ill-advised

http://users.ece.utexas.edu/~valvano/EE345M/SD_Physical_Layer_Spec.pdf

http://elm-chan.org/docs/mmc/mmc_e.html

Review the library code, review the Adafruit SPI SD code

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ark1
Associate II

thank you @Community member​ 

Ark1
Associate II

your suggestion is good:smiling_face_with_smiling_eyes:

but still facing problems in understanding the code:sad_but_relieved_face:

could you help me ? @Community member​ 

Ok, while discarding the HAL code might be an end goal, it does mean you need to understand the HW/SW at least as well as the people who wrote the original library. You could pay someone to teach you these things, or you could study the documentation and code yourself until you understand the mechanics.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Ark1
Associate II

ok, how much did you charge for teaching me these embedded stuffs?

because i need these knowledge badly.

@Community member​