cancel
Showing results for 
Search instead for 
Did you mean: 

SDIO/FIFO problem in STM32F103Z/STM3210E-EVAL board

john_vetter
Associate II
Posted on February 07, 2011 at 14:39

SDIO/FIFO problem in STM32F103Z/STM3210E-EVAL board

7 REPLIES 7
john_vetter
Associate II
Posted on May 17, 2011 at 14:24

the errata

http://www.st.com/stonline/products/literature/es/14732.pdf

mentions that multibyte support works, but it only mentions a Read operation.

Is this an oversight, or does this mean that a Write doesn't work?

Thanks,

John

aqueisser
Senior
Posted on May 17, 2011 at 14:24

I'm talking to an SDIO card from the STM3210E-EVAL in 4 bit mode as well. It sounds like you're writing to the FIFO directly, I'm using CMD53 with DMA and I don't see the problem you're describing. You may be timing out before the second word is written. Take a look at the status register to see if you have an underrun. I'm not sure whether the SDIO peripheral on the STM32 can stop the clock if the FIFO runs out of data.

If you're only sending short data streams you may be able to fill the fifo before enabling the DPSM. On the other hand, setting up DMA is easy enough and the ST sample code in stm32_eval_sdio_sd.c shows how it's done.

Andrew

john_vetter
Associate II
Posted on May 17, 2011 at 14:24

Thanks Andrew!

DMA seems to do the trick. Where did you find the stm32_eval_sdio_sd.c file? The demo version I have (V2.0) doesn't seem to have this one. It does have some sample code that writes data blocks in the SD mode and that does use DMA.

The trouble is that I can't seem to write to the FIFO before enabling the DPSM, and after enabling the DPSM, writing directly to the fifo seems too slow.

I'm still having trouble with data blocks of less than 16 bytes. Have you tried short blocks?

Thanks a bunch!

John

Gawie
Associate II
Posted on May 17, 2011 at 14:24

Hi John

Where did you find the stm32_eval_sdio_sd.c file? 

It is part of ST's stm32f10x_stdperiph_lib and you will find it in the Utilities\STM32_EVAL\Common\ folder.

Cheers,

Gawie

aqueisser
Senior
Posted on May 17, 2011 at 14:24

Hi John,

Glad you're making progress. I haven't tried shorter data blocks on my device since it only supports 512 byte block sizes (eMMC flash memory).

Gawie answered the question about where the SD code is - make sure you download the latest peripheral lib from ST. I think they made some fixes to the interrupt/DMA handling in the latest version.

Andrew

john_vetter
Associate II
Posted on May 17, 2011 at 14:24

Thanks Gawie and Andrew!

Where can I find the new peripherals library? The only firmware I could find associated with the eval board on the ST site is in um0549.zip, which appears to be the older version I am using.

Thanks once again,

John

Gawie
Associate II
Posted on May 17, 2011 at 14:24

You can find it at this link:

http://www.st.com/internet/com/SOFTWARE_RESOURCES/SW_COMPONENT/FIRMWARE/stm32f10x_stdperiph_lib.zip

Cheers,

Gawie