Hi,
This is the ADC working mechanism, for software triggering mode as you have done, writing the ADCx_SC1n register with channel bits ADCH will start the ADC conversion automatically, you can check the COCO bit to know if the conversion is over, if it is over, you can read the result.
The ADC16_SetChannelConfig(...,DEMO_ADC16_CHANNEL_GROUP,&adc16ChannelConfigStruct) line writes the ADCx_SC1n register, at the same start ADC conversion.
The ADC16_GetChannelStatussFlag() read the ADCx_SC1n register and poll the COCO bit.
Hope it can help you
BR
XiangJun Rong
xiangjun_rong_1-1703497045957.png