Why is the ADC w/DMA in STM32G4 not working?
I am initialising the ADC2 w/DMA via STM32CubeMX.
Scan conv. = enabled
continuous conv. = enabled
DMA cont. requests = enabled
overrun behaviour = data preserved
number of conversions = 2 (channel 1 and channel 2)
sequence of program (specific to DMA):
1 - uint32_t adc_val[2] (variable created for DMA)
2 - MX_DMA_init
3 - HAL_ADC_Start_DMA_ (passed adc_val)
4 - while(1) (using UART to send the adc data)
I tried the same program using adc polling (HAL_ADC_getvalue) and it did give me some data. But the DMA doesnt seem to work.