Skip to main content
Alex Mach
Associate II
September 4, 2019
Question

STM32F4. Interrupt from DMA burst writing only once appears

  • September 4, 2019
  • 5 replies
  • 1648 views

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.

This topic has been closed for replies.

5 replies

waclawek.jan
Super User
September 4, 2019

Is there any question?

JW

Alex Mach
Alex MachAuthor
Associate II
September 4, 2019

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

Tesla DeLorean
Guru
September 4, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
waclawek.jan
Super User
September 4, 2019

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

Alex Mach
Alex MachAuthor
Associate II
September 4, 2019

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?

Tesla DeLorean
Guru
September 4, 2019

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Alex Mach
Alex MachAuthor
Associate II
September 5, 2019

Thanks!

Alex Mach
Alex MachAuthor
Associate II
September 5, 2019

Thanks!