STM32G4 HAL does not support ADC_CHANNEL_0. Bug?
We are using the ADC on an STM32G4xx for a safety project. The safety manual requires us to read VSS or VDD for ADC diagnostics. STM32G4 has ADC channel 0 internally connected to VSSA, so we are trying to use HAL_ADC_ConfigChannel() to configure ADC_CHANNEL_0.
Unfortunately, HAL_ADC_ConfigChannel() asserts on IS_ADC_CHANNEL(hadc, sConfig->Channel) because IS_ADC_CHANNEL() does not check for ADC_CHANNEL_0. I would assume this is a bug in stm32g4xx_hal_adc_ex.h since all ADC instances in the G4 do support VSS as valid input channel (see reference manual section 21.4.4).
Can someone please look at this?
Regards, Norbert
