wafa_ath
DIIDevHeads IoT Integration Server
•Created by Sterling on 8/13/2024 in #firmware-and-baremetal
Why isn't my ADC with DMA setup updating the variable correctly on the STM32F407ZGT6?
Also,the issue stems from not enabling the DMA circular mode for ADC1. Add this line after enabling ADC DMA:
ADC1->CR2 |= ADC_CR2_DDS; // Enable DMA circular mode for ADC1
This should allow the DMA to continuously transfer data from the ADC to memory without CPU intervention, updating sensor_val as expected.
7 replies