mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
bootloader: disconnect VRTC from SAR input in bootloader_random_disable
Bootloader enables SAR ADC in test mode to get some entropy for the RNG. The bits which control the ADC test mux were not disabled, which caused extra ~24uA current to be drawn from VRTC, increasing deep sleep current consumption. This change disables relevant test mode bits in bootloader_random_disable.
This commit is contained in:
parent
1405fd1fef
commit
3b583c150f
@ -135,4 +135,8 @@ void bootloader_random_disable(void)
|
||||
/* Reset i2s peripheral */
|
||||
SET_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST);
|
||||
CLEAR_PERI_REG_MASK(DPORT_PERIP_RST_EN_REG, DPORT_I2S0_RST);
|
||||
|
||||
/* Disable pull supply voltage to SAR ADC */
|
||||
CLEAR_PERI_REG_MASK(RTC_CNTL_TEST_MUX_REG, RTC_CNTL_ENT_RTC);
|
||||
SET_PERI_REG_BITS(RTC_CNTL_TEST_MUX_REG, RTC_CNTL_DTEST_RTC, 0, RTC_CNTL_DTEST_RTC_S);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user