29 On-Chip Sensors and Analog Signal Processing
The pattern tables contain the measurement rules mentioned above. Each table has 16 items which store infor-
mation on channel selection, resolution and attenuation. When scanning starts, the controller reads measure-
ment rules one-by-one from a pattern table. For each controller the scanning sequence includes 16 different
rules at most, before repeating itself.
The 8-bit item (the pattern table register) is composed of three fields that contain channel, resolution and
attenuation information, as shown in Table 29-4.
ch_sel[3:0]
channel to be scanned
There are three scanning modes: single mode, double mode and alternate mode.
• Single mode: channels of either SAR ADC1 or SAR ADC2 will be scanned.
• Double mode: channels of SAR ADC1 and SAR ADC2 will be scanned simultaneously.
• Alternate mode: channels of SAR ADC1 and SAR ADC2 will be scanned alternately.
ESP32 supports up to a 12-bit SAR ADC resolution. The 16-bit data in DMA is composed of the ADC result and
some necessary information related to the scanning mode:
• For single mode, only 4-bit information on channel selection is added.
• For double mode or alternate mode, 4-bit information on channel selection is added plus one extra bit
indicating which SAR ADC was selected.
Espressif Systems
Figure 29-8. Diagram of DIG SAR ADC Controllers
Table 29-4. Fields of the Pattern Table Register
Pattern Table Register [7:0]
bit_width[1:0]
resolution
645
Submit Documentation Feedback
atten[1:0]
attenuation
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?