2018-09-28 10:10 PM
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.
2018-09-29 07:50 AM
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
2018-09-30 09:10 PM
thank you @Community member
2018-10-01 10:51 PM
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
2018-10-02 06:07 AM
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.
2018-10-02 09:12 PM
ok, how much did you charge for teaching me these embedded stuffs?
because i need these knowledge badly.
@Community member