2016-04-08 12:51 AM
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.2016-04-08 01:11 AM
Generate manually a CCx event using TIMx_EGR.
JW