Skip to content
esp-labsESP32-S3 bench guide
All blocks

Analog

SAR ADC

Two 12-bit converters that turn a voltage into a number

built, not flashed

Loading the 3D view…

  • AIN
  • VREF

Key facts

Gotchas

ADC2 stops working while Wi-Fi is on

The ADC2 channels (GPIO11-20) cannot be used at the same time as Wi-Fi: the radio shares ADC2 through an arbiter. Put analog sensors on ADC1 (GPIO1-10), as the sound labs do with GPIO6.

In our labs

8 labs use this block, across 1 tracks. Open a track to see them.

  • done by you
  • runs on the board
  • built, not flashed
  • planned

Key registers

SENS_SAR_MEAS1_CTRL2_REGoffset 0x000C
SENS_SAR_MEAS1_CTRL2_REG
BitsFieldWhat it does
30:19SENS_SAR1_EN_PADWhich pin to measure, as a bitmap.
17SENS_MEAS1_START_SARStart a conversion (software start).
16SENS_MEAS1_DONE_SARConversion done.
15:0SENS_MEAS1_DATA_SARThe ADC1 result.

Technical reference §39.7.2

SENS_SAR_ATTEN1_REGoffset 0x0014
SENS_SAR_ATTEN1_REG
BitsFieldWhat it does
31:0SENS_SAR1_ATTEN2 bits of attenuation per ADC1 channel.

Technical reference §39.7.2

APB_SARADC_CTRL_REGoffset 0x0000
APB_SARADC_CTRL_REG
BitsFieldWhat it does
18:15APB_SARADC_SAR1_PATT_LENHow many pattern-table entries to scan.
14:7APB_SARADC_SAR_CLK_DIVADC clock divider.
0APB_SARADC_START_FORCE1: start conversions from software.

Technical reference §39.7.3

APB_SARADC_APB_ADC_ARB_CTRL_REGoffset 0x0038
APB_SARADC_APB_ADC_ARB_CTRL_REG
BitsFieldWhat it does
11:10APB_SARADC_ADC_ARB_WIFI_PRIORITYPriority of the radio's use of ADC2.
9:8APB_SARADC_ADC_ARB_RTC_PRIORITYPriority of your ADC2 reads.

Technical reference §39.7.3

Read the full sectionTechnical reference §39.3