01.06.2014 Views

STM32W108C8

STM32W108C8

STM32W108C8

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>STM32W108C8</strong><br />

Analog-to-digital converter<br />

11.3 Analog-to-digital converter (ADC) registers<br />

11.3.1 ADC configuration register (ADC_CFG)<br />

Table 111.<br />

Address offset: 0xD004<br />

Reset value: 0x0000 1800<br />

ADC configuration register (ADC_CFG)<br />

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16<br />

Reserved<br />

15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0<br />

ADC_PERIOD<br />

ADC_<br />

HVSE<br />

LP<br />

ADC_<br />

HVSE<br />

LN<br />

ADC_MUXP<br />

ADC_<br />

MUXP<br />

ADC_MUXN<br />

ADC_1<br />

MHZC<br />

LK<br />

ST Reserved<br />

ADC_E<br />

NABLE<br />

rw rw rw rw rw rw rw rw rw<br />

Bits [15:13] ADC_PERIOD: ADC sample time in clocks and the equivalent significant bits in the conversion.<br />

0: 32 clocks (5 bits).4: 512 clocks (9 bits).<br />

1: 64 clocks (6 bits).5: 1024 clocks (10 bits).<br />

2: 128 clocks (7 bits).6: 2048 clocks (11 bits).<br />

3: 256 clocks (8 bits).7: 4096 clocks (12 bits).<br />

Bit 12 ADC_HVSELP: Select voltage range for the P input channel.<br />

0: Low voltage range (input buffer disabled).<br />

1: High voltage range (input buffer enabled).<br />

Bit 11 ADC_HVSELN: Select voltage range for the N input channel.<br />

0: Low voltage range (input buffer disabled).<br />

1: High voltage range (input buffer enabled).<br />

Bits [10:7] ADC_MUXP: Input selection for the P channel.<br />

0x0: PB5 pin. 0x8: GND (0V) (not for high voltage range).<br />

0x1: PB6 pin. 0x9: VREF/2 (0.6V).<br />

0x2: PB7 pin. 0xA: VREF (1.2V).<br />

0x3: PC1 pin. 0xB: VREG/2 (0.9V) (not for high voltage range).<br />

0x4: PA4 pin. 0x6, 0x7, 0xC-0xF: Reserved.<br />

0x5: PA5 pin.<br />

Bits [6:3] ADC_MUXN: Input selection for the N channel.<br />

Refer to ADC_MUXP above for choices.<br />

Bit 2 ADC_1MHZCLK: Select ADC clock:<br />

0: 6 MHz1: 1 MHz.<br />

Bit 1 Reserved: this bit must always be set to 0.<br />

Bit 0 ADC_ENABLE: Enable the ADC: write 1 to enable continuous conversions, write 0 to stop.<br />

When the ADC is started the first conversion takes twice the usual number of clocks plus 21<br />

microseconds. If anything in this register is modified while the ADC is running, the next<br />

conversion takes twice the usual number of clocks.<br />

Doc ID 018587 Rev 2 168/215

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!