2021-06-08 01:42 AM
Hi,
I've configured ADC + DMA to get a single 12-bit sample (of 7 channels) from an ISR routine. However I'd like to implement a double-buffer 'ping-ping' mechanism in order to process the chunk [7][1024] data at the end of acquisition. This is at sample number 1024 of channel 7.
Is there any example for the STM32L4 family with this implementation?
thanks in advance,
gaston
Solved! Go to Solution.
2021-06-12 05:54 AM
Some series have dual memory buffer support, but L4 doesn't have that feature. The next best option is to set the DMA in circular mode and use HT (half transfer) and TC (transfer complete) interrupts to process the data on the first or the second half of the buffer.
2021-06-11 11:09 AM
Hello @Gaston ,
Have a look at the ADC_DMA example within STM32CubeL4 MCU package, and you will probably find in the package a board that fit your need.
STM32Cube_FW_L4_V1.17.0\Projects\STM32L476G-EVAL\Examples\ADC\ADC_DMA_Transfer
You find a readme file describing how to test the application and you may update the example according to your needs.
Hope this helps you!
Imen
2021-06-12 05:54 AM
Some series have dual memory buffer support, but L4 doesn't have that feature. The next best option is to set the DMA in circular mode and use HT (half transfer) and TC (transfer complete) interrupts to process the data on the first or the second half of the buffer.