Associate III
February 17, 2022
Solved
STM32MP1 DMA buffer not populating with ADC values.
- February 17, 2022
- 1 reply
- 1157 views
/* USER CODE BEGIN PD */
#define ADC_BUF_LEN 4096
/* USER CODE END PD */
...
/* USER CODE BEGIN PV */
uint16_t adc_buf[ADC_BUF_LEN];
...
/* USER CODE BEGIN 2 */
HAL_ADC_Start_DMA(&hadc2, (uint32_t*)adc_buf, ADC_BUF_LEN);I've got the above code added to my project with the attached IOC, but when I hit a debug breakpoint after a second or so there are no values in the adc_buf.
In addition, when I probe the ANA1 (Arduino Pin A3) with nothing plugged in, I get a sine wave that sits offset at ~3v and has a peak to peak voltage of about 800mV and 128MHz frequency. See pic below.
It's also notable that there is no "DMA Continuous Requests" option in Parameter Settings which I understand I need to set to Enabled.


