Download Print this page

ST STM32F301 6 Series Reference Manual page 216

Advanced arm-based 32-bit mcus

Advertisement

Analog-to-digital converters (ADC)
Reading JSQR register returns the current JSQR context which is active at that
moment. When the JSQR context is empty, JSQR is read as 0x0000.
The Queue is flushed when stopping injected conversions by setting JADSTP=1 or
when disabling the ADC by setting ADDIS=1:
Note:
When configured in discontinuous mode (bit JDISCEN=1), only the last trigger of the
injected sequence changes the context and consumes the Queue.The 1
consumes the queue but others are still valid triggers as shown by the discontinuous mode
example below (length = 3 for both contexts):
st
1
trigger, discontinuous. Sequence 1: context 1 consumed, 1
nd
2
rd
3
trigger, discontinuous. Sequence 1: 3
th
4
trigger, discontinuous. Sequence 2: context 2 consumed, 1
th
5
trigger, discontinuous. Sequence 2: 2
th
6
trigger, discontinuous. Sequence 2: 3
Behavior when changing the trigger or sequence context
The
Figure 36
sequence or the triggers.
Figure 36. Example of JSQR queue of context (sequence change)
Write JSQR
EMPTY
JSQR queue
Trigger 1
ADC J context
EMPTY
(returned by reading
JSQR)
ADC state
1. Parameters:
P1: sequence of 3 conversions, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 4 conversions, hardware trigger 1
216/874
hardware or software injected triggers are ignored until the software re-writes a
new injected context into JSQR register.
If JQM=0, the Queue is maintained with the last active context.
If JQM=1, the Queue becomes empty and triggers are ignored.
trigger, disc. Sequence 1: 2
and
Figure 37
show the behavior of the context Queue when changing the
P1
P2
P1
RDY
nd
conversion.
rd
conversion.
nd
conversion.
rd
conversion.
P1,P2
P1
Conversion1 Conversion2 Conversion3
RM0366 Rev 5
RM0366
st
trigger only
st
conversion carried out
st
conversion carried out.
P3
P2
P3
P2,P3
P2
P3
RDY
Conversion1
RDY
MS30536V3

Advertisement

loading
Need help?

Need help?

Do you have a question about the STM32F301 6 Series and is the answer not in the manual?

This manual is also suitable for:

Stm32f301 8 seriesStm32f318 8 series