Skip to main content
xzhang2
Associate II
May 30, 2011
Question

DMA transfer between ext. Memory to SDIO problem

  • May 30, 2011
  • 3 replies
  • 770 views
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

    This topic has been closed for replies.

    3 replies

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

    BTW, The code works fine with STM32 internal RAM.

    aqueisser
    Associate III
    May 31, 2011
    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
    xzhang2Author
    Associate II
    June 1, 2011
    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