RM0432
12-bit data
bit15
SEXT D11
10-bit data
bit15
SEXT D9
8-bit data
bit15
SEXT D7
6-bit data
bit15
SEXT SEXT SEXT SEXT SEXT SEXT SEXT
ADC overrun (OVR, OVRMOD)
The overrun flag (OSR) notifies of that a buffer overrun event occurred when the regular
converted data has not been read (by the CPU or the DMA) before new converted data
became available.
The OVR flag is set if the EOC flag is still 1 at the time when a new conversion completes.
An interrupt can be generated if bit OVRIE=1.
When an overrun condition occurs, the ADC is still operating and can continue converting
unless the software decides to stop and reset the sequence by setting bit ADSTP=1.
OVR flag is cleared by software by writing 1 to it.
It is possible to configure if data is preserved or overwritten when an overrun event occurs
by programming the control bit OVRMOD:
•
OVRMOD=0: The overrun event preserves the data register from being overrun: the
old data is maintained and the new conversion is discarded and lost. If OVR remains at
1, any further conversions will occur but the result data will be also discarded.
•
OVRMOD=1: The data register is overwritten with the last conversion result and the
previous unread data is lost. If OVR remains at 1, any further conversions will operate
normally and the ADC_DR register will always contain the latest converted data.
Figure 120. Left alignment (offset enabled, signed value)
D10
D9
D8
D7
D8
D7
D6
D5
D6
D5
D4
D3
RM0432 Rev 6
Analog-to-digital converters (ADC)
bit7
D6
D5
D4
D3
bit7
D4
D3
D2
D1
bit7
D2
D1
D0
0
bit7
SEXT SEXT
D5
D2
D1
D0
0
D0
0
0
0
0
0
0
0
D4
D3
D2
D1
bit0
0
0
bit0
0
0
bit0
0
0
bit0
D0
0
MS31018V1
653/2301
724
Need help?
Do you have a question about the STM32L4+ Series and is the answer not in the manual?