cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeF4, Require SDIO Api's to perform CMD0,CMD3,CMD5,CMD7,CMD52,CMD53

ishmeetsinghis
Associate II
Posted on July 17, 2014 at 06:32

Hi,

I am using STM32Cube FW F4 v1.3.0, using STM32F401 Nucleo

I am using the SDIO evaluation example provided in stm32f4x9i_eval_sd.c 

It do contains API for sendCommand, but I require some API's to perform CMD0, CMD3, CMD7, CMD52, CMD53 commands.

Please excuse me, I am very new to SDIO protocol.

If anyone has an example code or can guide me to right path, much appreciable.

#stm32f4 #sdio #stm32f401
5 REPLIES 5
Posted on July 17, 2014 at 12:18

Hi singh.ishmeet,

Please take a look at the F4 HAL SD driver (stm32f4xx_hal_sd.c file)

It implements the SD card initialization and identification process using the right commands (CMD0...)

Thank you for your interest in our STM32Cube solution.

With regards.

ishmeetsinghis
Associate II
Posted on July 18, 2014 at 06:55

Hi Heisenberg,

Firstly thanks for the reply, Really appreciate it.

Please can you provide some code reference or direction of using CMD53 and data transfer on SDIO. 

I looked at the F4 HAL SD driver (stm32f4xx_hal_sd.c file), but it does not contain any API or reference to CMD53. I require an API, or some direction to implement CMD53 in SDIO. 

Thanks

Posted on July 18, 2014 at 11:33

Hi singh.ishmeet,

The CMD53 is not used within the stm32f4xx_hal_sd.c file, since it's an optional and SD I/O card only command, reserved for security specification.

You can find the SD_CMD_SDIO_RW_EXTENDED define under the stm32f4xx_hal_sd.h file. You can use the SDIO_CmdInitTypeDef structure and SDIO_SendCommand() function to send this command.

Just one remark, the SDIO_APP_CMD command should be sent before sending any SD Card specific command.

With regards.

ishmeetsinghis
Associate II
Posted on July 18, 2014 at 12:59

Hi Heisenberg,

Thank you for the reply,

Please can you also tell about the data write in blocks after CMD53. I have understood what you have just told me about how to send command, and using it I am able to send CMD53. 

But since CMD53 is a data command, so please tell how to write data blocks after using CMD 53.

Thanks

Posted on July 18, 2014 at 14:58

Hi singh.ishmeet,

You can refer to paragraph 5.3. IO_RW_EXTENDED Command (CMD53) under the SD Specifications / SDIO Simplified Specification, following this link: 

http://goo.gl/PGNm63

With regards.