2019-12-07 04:14 AM
Hey.
Im using adc dma to transfer data from adc to memory. After each sequence of conversion I need an interrupt.
My first question is that is using dma in my case something useless?
My second question is that after adc sequence of conversion interrupt flag is set,can I immediately read data from my dma buffer or the data is not transferred to memory yet and i need to get some flag from dma?
Solved! Go to Solution.
2019-12-07 05:05 AM
DMA can generate a HT and TC to indicate half or all the buffer full.
You can use these to determine the inactive half for a ping pong buffer.
When you get the DMA interrupt the data is already in the buffer. The ADC will continue, so the buffer will continue to update/change.
2019-12-07 05:05 AM
DMA can generate a HT and TC to indicate half or all the buffer full.
You can use these to determine the inactive half for a ping pong buffer.
When you get the DMA interrupt the data is already in the buffer. The ADC will continue, so the buffer will continue to update/change.
2019-12-07 09:00 AM
__HAL_DMA_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->CCR & (__INTERRUPT__)))
Should I use this macro?
In the adc it has a __HAL_ADC_GET_IT_flag that i use .when i use __HAL_adc_GET_IT_SOURCE it doesnt work.Bur=t dma dont have __HAL_DMA_GET_IT_flag.What should i do?