2022-02-17 11:37 AM
/* 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.
Solved! Go to Solution.
2022-02-17 06:00 PM
Well I finally found settings and code that worked. Not really sure what I did, but these are my configs for anyone else who's looking to do this.
2022-02-17 06:00 PM
Well I finally found settings and code that worked. Not really sure what I did, but these are my configs for anyone else who's looking to do this.