cancel
Showing results for 
Search instead for 
Did you mean: 

I can not use SDIO in 4bit Bus DMA mode

seawwh
Associate II
Posted on February 09, 2009 at 10:27

I can not use SDIO in 4bit Bus DMA mode

11 REPLIES 11
seawwh
Associate II
Posted on May 17, 2011 at 13:00

I tested STM32 SDIO for several days and

found the following appearance:

1. while (1) {

SD_ReadBlock();

SD_ReadBlock();

}

Test Passed

2. while (1) {

SD_ReadMultiBlocks();

SD_ReadMultiBlocks();

}

Test Passed

3. while (1) {

SD_WriteBlock();

SD_ReadMultiBlocks();

}

Test Error: SD_START_BIT_ERR

4. while (1) {

SD_WriteBlock();

Delay_ms(1000);

SD_ReadMultiBlocks();

}

Test Ok:

SD Card : KingSton 2G.

SDIO Mode: DMA+4bitsBus

I have read the relaxe's code ''SDIO_DosFS_V02.zip''. but not found any SD_ReadMultiBlocks/SD_WriteMultiBlocks in it.

who can give me some helps about SD_ReadMultiBlocks/SD_WriteMultiBlocks Operation in 4bitBus+DMA mode ?

Thanks a lot.

relaxe
Associate II
Posted on May 17, 2011 at 13:00

Hi there!

Nope, my SDIO_DosFS_V02.zip does not have multi-block read/write, only multiple single blocks, as the DosFS library does not discriminate 1 or multi block in line. I am however working on a third version that may include that, as I need more speed for my projects.

The Read/Write (single) code actually start a DMA transfer, then wait for the TX/RX_Empty flag from the DMA, in a blocking function.

Maybe the read/write multi actually works in a similar way, but without the last ''wait''? Instead of a delay, if you looked at the DMA empty flags?

-Relaxe