2023-02-07 09:04 AM
I have an A/D circular DMA that collects 192 samples...There can be times when an asynchronous push button event interrupts this while it is collecting. Can someone tell me the quickest solution for resetting the DMA so that after I service the push button event it will start collecting at the beginning again?
2023-02-07 09:07 AM
not saying is the fastest way but i use: hal_tim_stop
HAL_TIM_IC_Stop_DMA(ICtimerpointer, ICtimerRisingedgeChannel);
HAL_TIM_IC_Start_DMA(ICtimerpointer, ICtimerRisingedgeChannel, DMAcapturedriseData, DMAbufferSize);
2023-02-07 09:26 AM
Hi Javier.....
But does it reset the pointer so the circular buffer is back at the beginning? That is important to me that when I get done processing the button I don't want my DMA to pick up where it left off as that would mean samples from different times.....
2023-02-08 04:56 AM
>>But does it reset the pointer so the circular buffer is back at the beginning?
I believe it does? set some debugging breaks in your code and let me know.