cancel
Showing results for 
Search instead for 
Did you mean: 

DMA transfer between ext. Memory to SDIO problem

xzhang2
Associate II
Posted on May 30, 2011 at 18:43

Hi guys,

I am working on a customized board with STM32F103. I am using SDIO example from library (V3.4) but modified the memory addr to external memory addr. I got problem when DMA transfer data from external memory to SDIO fifo. the error is SD_Error 5, which is ''SD_TX_UNDERRUN'' according the defination of stm32_eval_sdio_sd.h.

Could anyone tell me what is wrong?

Thx.

JZ

3 REPLIES 3
xzhang2
Associate II
Posted on May 30, 2011 at 19:39

BTW, The code works fine with STM32 internal RAM.

aqueisser
Senior
Posted on May 31, 2011 at 21:20

Your external memory is probably too slow and the DMA cannot fill the FIFO fast enough. Try reducing the clock frequency of the SDIO peripheral. Also make sure nothing else slows down the DMA while the transfer to SDIO is going on. You can also try to enable HW handshaking on the SDIO peripheral, which will stop the clock when the FIFO runs low. I couldn't get that to work on my system but it might work for yours.

xzhang2
Associate II
Posted on June 01, 2011 at 23:52

This is interesting. I've never thought FSMC speed could cause this kind problem. 

I h�?ve �? st�?322�?G ev�?l b�?�?rd. I tried s�?�?e test �?n this ev�?l b�?�?rd, �?nd it w�?rks�?

I will try y�?ur suggesti�?n �?n st�?32f1�?3 t�? see wh�?t g�?nn�? h�?�?�?en.

Th�?nks,

JZ