cancel
Showing results for 
Search instead for 
Did you mean: 

Manual DMA event triggering

luke2
Associate II
Posted on April 08, 2016 at 09:51

On the STM32F303 I have a timer with an OC that triggers DMA events to write byte values onto GPIO. The DMA is set up with a cyclical byte buffer that is populated by the core via interrupt. For technical reasons I need to be able to preload the first byte from this buffer onto the GPIO BEFORE starting the timer generating the DMA events. The buffer needs to be word aligned, meaning I cannot simply change buffer alignment and start the DMA a byte later. What I would like to do is set up the DMA and then manually trigger a single DMA transfer before I activate the timer, so it is in X+1 position and the first byte in the buffer in on the GPIO (thus when the first OC triggers, the second byte will be put onto GPIO by the DMA). 

Am I missing something, is there an easy way to do this? Can I manually update the current DMA buffer position? I tried to figure this out but haven't had any luck yet.

Thanks for your help.
1 REPLY 1
Posted on April 08, 2016 at 10:11

Generate manually a CCx event using TIMx_EGR.

JW