AnsweredAssumed Answered

SDIO DMA Timeout

Question asked by melamud.michael on Jun 24, 2013
Latest reply on Jun 30, 2013 by melamud.michael
Hi All ,

Till now i worked with the STM3240G-EVAL , At the beginning i had a problem that i received DMA timeout when i tried to write to the sd-card.
The was due to a problem that the DMA interrupt , i.e the 3 next lines :

SDIO_ITConfig(SDIO_IT_DCRCFAIL | SDIO_IT_DTIMEOUT | SDIO_IT_DATAEND | SDIO_IT_RXOVERR | SDIO_IT_STBITERR, ENABLE);
SDIO_DMACmd(ENABLE);
SD_LowLevel_DMA_TxConfig((uint32_t *)writebuff, (NumberOfBlocks * BlockSize));

which enable the DMA were after the DMA request was sent , causing me to go into DMA timeout , i fixed this issue  by moving this 3 lines before the DMA request is sent and everything was fine.

Now i started working with  STM3220G-EVAL which is basically the same evaluation board with the same peripherals and drivers ,the main difference is that is Cortex M3 instead of Cortex M4 , i fixed this issue the same i did on the first evaluation board,
But for some reason it does not solve the issue , and i am receiving DMA timeout , i.e i never get to here :

void SD_ProcessDMAIRQ(void)
{
  if(DMA2->LISR & SD_SDIO_DMA_FLAG_TCIF)
  {
    DMAEndOfTransfer = 0x01; //<---Here
    DMA_ClearFlag(SD_SDIO_DMA_STREAM, SD_SDIO_DMA_FLAG_TCIF|SD_SDIO_DMA_FLAG_FEIF);
  }
}

I don't have any clue why does it happen , maybe some one here can help me with the issue ?


Thanks
Michael

Outcomes