cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 SDIO DMA interrupts not triggered in another interrupt

yada
Associate
Posted on November 15, 2013 at 04:56

Hello,

I have been busy these past days trying to understand a problem revolving around this simple algorithm :

every second write a byte through SDIO using ST DMA2 example.

Using a simple loop in main works perfectly :

while(1) file.write(1);

But using a TIM interrupt fails :

void TIM7_IRQHandler(void) { file.write(1); }

The operation hangs in :

SD_WaitReadOperation(void) first while loop checking for the DMA transfer end :

while ((DMAEndOfTransfer == 0x00) && (TransferEnd == 0) && (TransferError == SD_OK) && (timeout > 0))

It seems the DMA2 interrupts aren't triggered when the context is the TIM interrupt.

The preemption priorities are :

         - SDIO_IRQn : 0 (ST example),

         - SDIO SD_SDIO_DMA_IRQn: 1 (ST example),

         - TIM_IRQn : 11.

The MCU is STM32F407VET6 and DMA is only used for SDIO. The same problem happens when the context is an USART interrupt.

Is this expected behaviour ?

Thank you very much !

#stm32 #sdio #interrupt #dma
0 REPLIES 0