2019-07-09 02:53 AM
Hi,
I am working on eval stm32f769. I have used DMA burst mode in circular.
I want to forcefully abort DMA stream and DMA, so that on I can restart DMA burst with different sequence.
I have used HAL_TIM_DMABurst_WriteStart() API for starting burst mode and HAL_TIM_DMABurst_WriteStop() for stopping burst mode.
Suppose a DMA burst sequence is going on and in middle of transfer I stop DMA using HAL_TIM_DMABurst_WriteStop().
DMA doesn't gets stopped. My next DMA sequence gets start after waiting for previous burst time elapse.
I want to start new DMA burst sequence as soon as I stop DMA burst by calling
HAL_TIM_DMABurst_WriteStop().
Please suggest how to proceed.
Solved! Go to Solution.
2019-09-11 01:56 AM
> DMA burst mode: BurstRequestSrc TIM DMA Request sources is TIM_DMA_UPDATE.
Try calling HAL_TIM_GenerateEvent(yourtimer, TIM_EVENTSOURCE_UPDATE) after HAL_TIM_DMABurst_WriteStart().
JW
2019-07-16 03:42 AM
Any suggestions please!
2019-07-17 08:20 AM
> DMA doesn't gets stopped.
How do you know that? What are the symptoms? What is the related DMA registers' content?
What exactly do you mean by Burst mode?
I don't use Cube/HAL.
JW
2019-07-17 11:34 PM
Hi,
DMA burst mode: BurstRequestSrc TIM DMA Request sources is TIM_DMA_UPDATE.
DMA in circular mode.
I am facing a problem as,
I have to two different PWM sequences. Suppose sequence one is doing DMA transfer and in middle of transfer I stop DMA write by HAL_TIM_DMABurst_WriteStop() API, DMA stops here.
And I immediately starts other sequence using HAL_TIM_DMABurst_WriteStart() API.
But new sequence does not gets started immediately. This other sequence waits for first sequence to be completed. I am using DMA in a circular mode.
New sequence gets started once I reached the end of first sequence.
e.g.
First sequence total time = 30 seconds.
Second sequence = 15 seconds
First sequence is doing DMA transfer and after 10 seconds I stop DMA write. And starts second sequence DMA write. Second sequence gets starts at the end of 30 seconds rather than being started immediately.
How do I start other sequence immediately?
Thanks.
2019-07-18 09:54 AM
I don't use Cube/HAL, and don't understand why the said function waits longer than necessary, sorry.
JW
2019-07-18 11:22 PM
Can you help me with the correct way to use DMA burst mode? So that I can successfully run two different DMA sequences as I needed without using HAL.
Or any reference for using DMA burst mode will be helpful for me.
2019-09-11 01:56 AM
> DMA burst mode: BurstRequestSrc TIM DMA Request sources is TIM_DMA_UPDATE.
Try calling HAL_TIM_GenerateEvent(yourtimer, TIM_EVENTSOURCE_UPDATE) after HAL_TIM_DMABurst_WriteStart().
JW
2019-09-11 03:19 AM
Thanks JW,
It works.
> DMA burst mode: BurstRequestSrc TIM DMA Request sources is TIM_DMA_UPDATE.
Try calling HAL_TIM_GenerateEvent(yourtimer, TIM_EVENTSOURCE_UPDATE) after HAL_TIM_DMABurst_WriteStart().