2023-11-20 01:34 AM
Hi I already asked for multi channel ADC in STM32G030K8 PA0,PA2,PA5,PA9,PA11,PA12.while debugging I am getting all ADC values as same if I made one by one its working properly Can any one help how to proceed with that.
2023-11-20 02:06 AM - edited 2023-11-20 02:07 AM
set Sequencer to "fully configurable"
set Enable in Scan Conversion Mode
in ADC_Regular_ConversionMode
set Sampling Time
Set Number of Conversion to quantity of your channel needed
and set each channel in Rank.
in your code, you can get data for each channel by run polling and getADC for each channel.
And I suggest to use interrupt or DMA is easier than polling.
2023-11-20 03:43 AM
I cant do as fully configuarable as I am using PA12 and PA11 I can give a try with DMA
thanks