Analog-to-digital converters (ADC)
RM0365
309/1080
DocID025202 Rev 7
15.3.19 Injected channel management
Triggered injection mode
To use triggered injection, the JAUTO bit in the ADCx_CFGR register must be cleared.
1.
Start the conversion of a group of regular channels either by an external trigger or by
setting the ADSTART bit in the ADCx_CR register.
2. If an external injected trigger occurs, or if the JADSTART bit in the ADCx_CR register is
set during the conversion of a regular group of channels, the current conversion is
reset and the injected channel sequence switches are launched (all the injected
channels are converted once).
3. Then, the regular conversion of the regular group of channels is resumed from the last
interrupted regular conversion.
4. If a regular event occurs during an injected conversion, the injected conversion is not
interrupted but the regular sequence is executed at the end of the injected sequence.
shows the corresponding timing diagram.
Note:
When using triggered injection, one must ensure that the interval between trigger events is
longer than the injection sequence. For instance, if the sequence length is 28 ADC clock
cycles (that is two conversions with a sampling time of 1.5 clock periods), the minimum
interval between triggers must be 29 ADC clock cycles.
Auto-injection mode
If the JAUTO bit in the ADCx_CFGR register is set, then the channels in the injected group
are automatically converted after the regular group of channels. This can be used to convert
a sequence of up to 20 conversions programmed in the ADCx_SQR and ADCx_JSQR
registers.
In this mode, the ADSTART bit in the ADCx_CR register must be set to start regular
conversions, followed by injected conversions (JADSTART must be kept cleared). Setting
the ADSTP bit aborts both regular and injected conversions (JADSTP bit must not be used).
In this mode, external trigger on injected channels must be disabled.
If the CONT bit is also set in addition to the JAUTO bit, regular channels followed by injected
channels are continuously converted.
Note:
It is not possible to use both the auto-injected and discontinuous modes simultaneously.
When the DMA is used for exporting regular sequencer’s data in JAUTO mode, it is
necessary to program it in circular mode (CIRC bit set in DMA_CCRx register). If the CIRC
bit is reset (single-shot mode), the JAUTO sequence will be stopped upon DMA Transfer
Complete event.
JEXT13
TIM3_CC1 event
Internal signal from on chip timers
1101
JEXT14
TIM6_TRGO event
Internal signal from on chip timers
1110
JEXT15
TIM15_TRGO event
Internal signal from on chip timers
1111
Table 88. ADC1 & ADC2 - External trigger for injected channels (continued)
Name
Source
Type
JEXTSEL[3..0]