cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4. Interrupt from DMA burst writing only once appears

Alex Mach
Associate III

MCU is STM32F405. I write data array to output pins using DMA mem to peripheral (DM2 stream6 channel0). Trigger is TIM1 CC1 event. Also I use DMA2 stream5 channel6 for write to TIM1 registers. Trigger is TIM1 UEV event. So the writing and interrupt DMA_IT_TCIF5 appears ony once but TIM1_SR.UIF is set every time.

8 REPLIES 8

Is there any question?

JW

Alex Mach
Associate III

My question is why only once the interrupt appears? Update events occurs but no DMA burst writing and no interrupts generates.

Why do you think several interrupt should appear? Do you set DMA as circular? Is there any DMA transfer error indicated in the DMA status register?

JW

Is the Stream 5 circular? TC will normally occur once per DMA transfer (could involve thousands of DMA requests), once the last work is delivered.

Check for error status from the DMA unit.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Alex Mach
Associate III

There aren't any errors at DMA unit. DMA is normal, but UEV occurs periodically. So I think TC will occur for every UEV. It's not true?

TC will only fire once all available data is consumed​. It can keep firing only if the DMA is in circular mode, reseting the buffer pointer/size at completion of entire buffer. This can be at a rate significantly decimated compared to the TIM triggered requests.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Alex Mach
Associate III

Thanks!

Thanks!