| Electronic Components Datasheet Search |
|
STM32W108HB Datasheet(PDF) 131 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
STM32W108HB Datasheet(HTML) 131 Page - STMicroelectronics |
|
131 / 179 page ![]() STM32W108CB, STM32W108HB Analog-to-digital converter Doc ID 16252 Rev 2 131/179 9.1 Functional description 9.1.1 Setup and configuration To use the ADC follow this procedure, described in more detail in the next sections: ● Configure any GPIO pins to be used by the ADC in analog mode. ● Configure the voltage reference (internal or external). ● Set the offset and gain values. ● Reset the ADC DMA, define the DMA buffer, and start the DMA in the proper transfer mode. ● If interrupts will be used, configure the primary ADC interrupt and specific mask bits. ● Write the ADC configuration register to define the inputs, voltage range, sample time, and start the conversions. 9.1.2 GPIO usage A GPIO pin used by the ADC as an input or voltage reference must be configured in analog mode by writing 0 to its 4-bit field in the proper GPIO_PnCFGH/L register. Note that a GPIO pin in analog mode cannot be used for any digital functions, and software always reads it as 1. See Section 6: General-purpose input/outputs on page 46 for more information about how to configure the GPIO pins. 9.1.3 Voltage reference The ADC voltage reference (VREF), may be internally generated or externally sourced from PB0. If internally generated, it may optionally be output on PB0. To use an external reference, an ST system function must be called after reset and after waking from deep sleep. PB0 must also be configured in analog mode using GPIO_PBCFGH[3:0]. See the STM32W108 HAL documentation for more information on the system functions required to use an external reference. Table 15. ADC GPIO pin usage Analog Signal GPIO Configuration control ADC0 input PB5 GPIO_PBCFGH[7:4] ADC1 input PB6 GPIO_PBCFGH[11:8] ADC2 input PB7 GPIO_PBCFGH[15:12] ADC3 input PC1 GPIO_PCCFGH[7:4] ADC4 input PA4 GPIO_PACFGH[3:0] ADC5 input PA5 GPIO_PACFGH[7:4] VREF input or output PB0 GPIO_PBCFGH[3:0] |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |