2024-05-28 10:37 AM
Hi,
I cannot understand acquired ADC data order using this configuration on a STM32G030C6 device:
I want to acquire 9 input channels + 2 internal channels (Temperature Sensor + Vbat). Continuous mode w/ Circular DMA
Here's my Initialization routine
static uint32_t adc_values[11];
HAL_ADCEx_Calibration_Start(&hadc1);
// DMA continous requests: ENABLED
HAL_ADC_Start_DMA(&hadc1, adc_values, 11);
Everything works as expected except the channels order.
Does anyone know what the problem is?
I'm not able to find any example with similar configuration.
Thanks in advance,
Gaston
Solved! Go to Solution.
2024-05-28 12:39 PM - edited 2024-05-28 12:40 PM
Oh, ok , on G030 ...
So check, whats the "ch numbers" ...this is the sequence then.
see rm...
2024-05-28 12:03 PM - edited 2024-05-28 12:04 PM
Hi,
the sequence depends on the Rank numbers - what you set ?
On every Rank you can choose, which channel is it , to convert. So you decide about the sequence !
see:
I set 3 conversions, but 2. is temp channel...because i choose it for Rank 2.
2024-05-28 12:12 PM - edited 2024-05-28 12:13 PM
Thank you for replying. I know this but I see no way to select Rank numbers in this ADC configuration. Notes that Sequencer is set to not fully configurable as I need IN15 and IN16 input channels.
2024-05-28 12:39 PM - edited 2024-05-28 12:40 PM
Oh, ok , on G030 ...
So check, whats the "ch numbers" ...this is the sequence then.
see rm...
2024-05-28 11:17 PM
Blessed RM :folded_hands: I should have checked it before raising the question. Now it makes sense.
Thank you very much AScha.3!
Gaston