09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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.

Analog-to-digital converter (ADC) <strong>RM0090</strong><br />

Figure 38. Right alignment of 12-bit data<br />

Injected group<br />

SEXT<br />

SEXT<br />

Regular group<br />

SEXT<br />

SEXT<br />

Figure 39. Left alignment of 12-bit data<br />

Special case: when left-aligned, the data are aligned on a half-word basis except when the<br />

resolution is set to 6-bit. in that case, the data are aligned on a byte basis as shown in<br />

Figure 40.<br />

Figure 40. Left alignment of 6-bit data<br />

11.5 Channel-wise programmable sampling time<br />

The ADC samples the input voltage for a number of ADCCLK cycles that can be modified<br />

using the SMP[2:0] bits in the ADC_SMPR1 and ADC_SMPR2 registers. Each channel can<br />

be sampled with a different sampling time.<br />

The total conversion time is calculated as follows:<br />

Tconv = Sampling time + 12 cycles<br />

Example:<br />

With ADCCLK = 30 MHz and sampling time = 3 cycles:<br />

Tconv = 3 + 12 = 15 cycles = 0.5 µs with APB2 at 60 MHz<br />

271/1416 Doc ID 018909 Rev 3<br />

D11<br />

D10<br />

D9 D8 D7 D6 D5 D4 D3 D2 D1 D0<br />

0 0 0 0 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0<br />

Injected group<br />

SEXT<br />

D11<br />

Regular group<br />

D10<br />

D9<br />

D8<br />

D7<br />

D6 D5 D4 D3 D2 D1 D0 0 0 0<br />

D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0<br />

Injected group<br />

SEXT SEXT<br />

Regular group<br />

SEXT<br />

SEXT<br />

SEXT SEXT SEXT SEXT SEXT<br />

D5 D4 D3 D2 D1 D0 0<br />

0 0 0 0 0 0 0 0 D5 D4 D3 D2 D1 D0 0 0<br />

ai16050<br />

ai16051<br />

ai16052

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

Saved successfully!

Ooh no, something went wrong!