Analog-to-digital converters (ADC)
RM0365
315/1080
DocID025202 Rev 7
It is recommended to manage the queue overflows as described below:
•
After each P context write into JSQR register, flag JQOVF shows if the write has been
ignored or not (an interrupt can be generated).
•
Avoid Queue overflows by writing the third context (P3) only once the flag JEOS of the
previous context P2 has been set. This ensures that the previous context has been
consumed and that the queue is not full.
Queue of context: Behavior when the queue becomes empty
and
show the behavior of the context Queue when the Queue becomes
empty in both cases JQM=0 or 1.
Figure 67. Example of JSQR queue of context with empty queue (case JQM=0)
1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
Note:
When writing P3, the context changes immediately. However, because of internal
resynchronization, there is a latency and if a trigger occurs just after or before writing P3, it
can happen that the conversion is launched considering the context P2. To avoid this
situation, the user must ensure that there is no ADC trigger happening when writing a new
context that applies immediately.
Figure 68. Example of JSQR queue of context with empty queue (case JQM=1)
1. Parameters:
P1: sequence of 1 conversion, hardware trigger 1
P2: sequence of 1 conversion, hardware trigger 1
P3: sequence of 1 conversion, hardware trigger 1
069
3
7KHTXHXHLVQRWHPSW\
DQGPDLQWDLQV3EHFDXVH-40
4XHXHQRWHPSW\
3PDLQWDLQHG
3
3
#ONVERSION
#ONVERSION
5'<
5'<
5'<
5'<
#ONVERSION
#ONVERSION
#ONV
5'<
(037<
3
3
3
33
3
3
(037<
3
-645TXHXH
:ULWH-645
7ULJJHU
$'&VWDWH
$'&-FRQWH[W
UHWXUQHGE\
UHDGLQJ-465
)GNORED
1UEUEBECOMESEMPTY
ANDTRIGGERSAREIGNORED
BECAUSE*1-
-36
3
3
3
(037<
&RQYHUVLRQ
&RQYHUVLRQ
3
33
3
3
3
3
3
(037<
5'<
5'<
5'<
&RQYHUVLRQ
-645
TXHXH
:ULWH-645
7ULJJHU
$'&VWDWH
$'&
-FRQWH[W
UHWXUQHGE\UHDGLQJ-465
5'<
(037<[
(037<
(037<
(037<
)GNORED