AnsweredAssumed Answered

STM32F4 DMA interrupt not generated all the time

Question asked by Hemanth Sundaresh on Jan 27, 2017
Latest reply on Feb 9, 2017 by Hemanth Sundaresh

Hello All,

I am using STM32F407 discovery board. I am using SD IO card with this board.

 

I tried configuring DMA for data transfer.

I observed that the interrupt (DMA interrupts) are not generated after Transfer complete evertime.
After fresh compilation in IAR workbench, the interrupt are generated correctly, but subsequent runs the DMA interrupt is not generated despite data transfer done.

 

I have a blocking condition check that wait for the completion of SDIO data transfer.
In most of the case it is waiting endlessly here because of no Transfer complete interrupt generation by DMA.

Sometimes if halt the controller and double click of register veiw of DMA2 (DMA2_S3M0AR), the interrupt is generated correctly!!

After this there are no more DMA interrupt issues.

//configure dma for rx
SD_LowLevel_DMA_RxConfig(data, count);

//flag to check transfer complete
DMAEndOfTransfer = 0;
//enable dma streaming
DMA_Cmd(SD_SDIO_DMA_STREAM, ENABLE);
//enable dma in sdio
SDIO_DMACmd(ENABLE);

while(!DMAEndOfTransfer);

//dma disable rx
SDIO_DMACmd(DISABLE);

//enable sdio interrupt
SDIO_ITConfig(SDIO_IT_SDIOIT, ENABLE);

 

No issues are observed in Non-DMA case
I am using Std Peripharal library

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32065.license%3d1485511120029.html

 

 


Could some one help me for this strange issue??


Thanks!!

Regards,
Hemanth

Outcomes