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.
Radio
2.4 GHz 802.11b/g/n, as a station, an access point or both
runs on the boardLoading the 3D view…
802.11b/g/n on 2.4 GHz (2412-2484 MHz), 20 or 40 MHz channels, up to 150 Mbps.
Station, SoftAP, or both at once, with WPA2 and WPA3 security in hardware.
Up to +21 dBm out (802.11b). Sending draws up to 340 mA, so the supply must give at least 500 mA.
While Wi-Fi is on, ADC2 (GPIO11-20) is not available for your readings.
The radio only works while the CPU is clocked from the PLL.
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.
Wi-Fi and Bluetooth LE only work while the CPU clock comes from the PLL. Running the CPU from the crystal or the RC oscillator to save power stops the radio.
6 labs use this block, across 3 tracks. Open a track to see them.
SYSTEM_SYSCLK_CONF_REGoffset 0x0060| Bits | Field | What it does |
|---|---|---|
| 18:12 | SYSTEM_CLK_XTAL_FREQ | The crystal frequency in MHz (40). |
| 11:10 | SYSTEM_SOC_CLK_SEL | CPU clock source: 1 (PLL) is required for Wi-Fi. |
APB_SARADC_APB_ADC_ARB_CTRL_REGoffset 0x0038| Bits | Field | What it does |
|---|---|---|
| 11:10 | APB_SARADC_ADC_ARB_WIFI_PRIORITY | The radio's priority on ADC2. |
| 4 | APB_SARADC_ADC_ARB_WIFI_FORCE | Hand ADC2 to the radio. |
RTC_CNTL_RTC_WAKEUP_STATE_REGoffset 0x003C| Bits | Field | What it does |
|---|---|---|
| 31:15 | RTC_CNTL_RTC_WAKEUP_ENA | Wake-up sources; the Wi-Fi bit (0x20) lets the radio wake the chip from light sleep. |
Read the full sectionChip datasheet §C4.3.2