cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S001J3 ADC AIN2 Configuration and Alignment Behavior in STM8S001J3 MCU

shyamparmar
Associate III

Dear STM32 Community,

I am working on the STM8S001J3 microcontroller and trying to configure Pin 7 as ADC channel AIN2. However, I am facing some challenges:

ADC Count Not Generating:
I have configured the pin for ADC operation, but it does not generate any counts. I suspect the issue might be related to ADC initialization or incorrect AFR2/NAFR2 settings. Could someone please guide me with the correct initialization function and the required AFR2 and NAFR2 configuration for ADC channel AIN2?

Alignment Differences:
I observe different values when selecting right alignment or left alignment in the ADC result. I would like to understand whether the values obtained in these two alignments are supposed to be identical or if there is a conversion factor I should consider.

Any advice or corrections to my setup would be greatly appreciated.

Thank you in advance for your help!

0 REPLIES 0