cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO Wide bus (4-bit) operation mode

stm322
Associate II
Posted on March 04, 2009 at 13:15

SDIO Wide bus (4-bit) operation mode

3 REPLIES 3
stm322
Associate II
Posted on May 17, 2011 at 13:05

Hello,

I try to write a block on a SDIO card. For that I need to set the wide bus (4-bit) operation mode (meaning data would be transferred on D[3.0])

On the datasheet of the STM32F103 it says:

Wide bus (4-bit bus width) operation mode is selected or deselected using

SET_BUS_WIDTH (ACMD6).

The device I plugged on the SDIO doesn t support the command 6. It only supports command 52 (IO_RW_DIRECT) and command 53 (IO_RW_EXTENDED).

Would anybody know how to set the SDIO bus width on 4 bits on a STM32F103?

Thanks in advance.

vinicius_acvasconcelos
Associate II
Posted on May 17, 2011 at 13:05

Quote:

On 03-03-2009 at 15:28, Anonymous wrote:

Hello,

I try to write a block on a SDIO card. For that I need to set the wide bus (4-bit) operation mode (meaning data would be transferred on D[3.0])

On the datasheet of the STM32F103 it says:

Wide bus (4-bit bus width) operation mode is selected or deselected using

SET_BUS_WIDTH (ACMD6).

The device I plugged on the SDIO doesn t support the command 6. It only supports command 52 (IO_RW_DIRECT) and command 53 (IO_RW_EXTENDED).

Would anybody know how to set the SDIO bus width on 4 bits on a STM32F103?

Thanks in advance.

SDIO_InitStructure.SDIO_BusWide = SDIO_BusWide_4b;

You can follow the example:

SDIO_InitTypeDef SDIO_InitStructure;

SDIO_InitStructure.SDIO_ClockDiv = 0xB2;

SDIO_InitStructure.SDIO_ClockEdge = SDIO_ClockEdge_Rising;

SDIO_InitStructure.SDIO_MCLKBypass = SDIO_MCLKBypass_Disable;

SDIO_InitStructure.SDIO_ClockPowerSave =

SDIO_ClockPowerSave_Enable;

SDIO_InitStructure.SDIO_BusWide = SDIO_BusWide_4b;

SDIO_InitStructure.SDIO_HardwareFlowControl =

SDIO_HardwareFlowControl_Enable;

SDIO_Init(&SDIO_InitStructure);

stm322
Associate II
Posted on May 17, 2011 at 13:05

Thanks vinicius_acvasconcelos

I can see how put the SDIO in 4 bits mode.

Now I ve got to find out why the data are not transferred.