Hello david,
I have test on my side ,it is the same wiht you , ,maybe there are some problem here.
And you can do like this : change the ADC_SC2 = ADC_SC2_REFSEL(0x00) to ADC_SC2 = ADC_SC2_REFSEL(0x01) ;
then right click the ADC component , select "Don't write genereated component modules" .

Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------