Subsection 6.3.3 Register Summary
These are the registers this chapter uses, each with the one field of it that we touch.
| Register | Field | Purpose |
|---|---|---|
RCC_APBENR2 |
ADCEN |
Enable the clock to the ADC |
GPIOx_MODER |
MODEn |
Set the pin to analog mode (11) |
ADC_CHSELR |
CHSELn |
Select channel \(n\) for conversion |
ADC_CR |
ADEN |
Enable the converter |
ADC_CR |
ADSTART |
Start a conversion |
ADC_ISR |
ADRDY |
Converter is ready (write 1 to clear) |
ADC_ISR |
EOC |
Conversion complete (cleared by reading ADC_DR, or by writing 1) |
ADC_DR |
– | The 12-bit result, right-aligned in bits 11:0 |
ADC_CFGR1 |
RES |
Resolution: 12, 10, 8, or 6 bits |
