mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
light sleep: fix Flash leakage when its CS pin has no hardware pullup
This commit is contained in:
@@ -109,6 +109,14 @@ menu "ESP System Settings"
|
|||||||
pull-up, you do not need to select this option, otherwise, you
|
pull-up, you do not need to select this option, otherwise, you
|
||||||
should enable this option.
|
should enable this option.
|
||||||
|
|
||||||
|
config ESP_SYSTEM_FLASH_LEAKAGE_WORKAROUND
|
||||||
|
bool "Flash leakage current workaround in light sleep"
|
||||||
|
help
|
||||||
|
When the CS pin of Flash is not pulled up, the sleep current will
|
||||||
|
increase during light sleep. If the CS pin of Flash has an external
|
||||||
|
pull-up, you do not need to select this option, otherwise, you
|
||||||
|
should enable this option.
|
||||||
|
|
||||||
menu "Memory protection"
|
menu "Memory protection"
|
||||||
|
|
||||||
config ESP_SYSTEM_MEMPROT_FEATURE
|
config ESP_SYSTEM_MEMPROT_FEATURE
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
#include "soc/soc_caps.h"
|
#include "soc/soc_caps.h"
|
||||||
#include "driver/rtc_io.h"
|
#include "driver/rtc_io.h"
|
||||||
#include "hal/rtc_io_hal.h"
|
#include "hal/rtc_io_hal.h"
|
||||||
|
#include "bootloader_common.h"
|
||||||
|
|
||||||
#include "driver/uart.h"
|
#include "driver/uart.h"
|
||||||
|
|
||||||
@@ -424,6 +425,9 @@ void esp_sleep_config_gpio_isolate(void)
|
|||||||
#if CONFIG_ESP_SYSTEM_PSRAM_LEAKAGE_WORKAROUND && CONFIG_SPIRAM
|
#if CONFIG_ESP_SYSTEM_PSRAM_LEAKAGE_WORKAROUND && CONFIG_SPIRAM
|
||||||
gpio_sleep_set_pull_mode(esp_spiram_get_cs_io(), GPIO_PULLUP_ONLY);
|
gpio_sleep_set_pull_mode(esp_spiram_get_cs_io(), GPIO_PULLUP_ONLY);
|
||||||
#endif
|
#endif
|
||||||
|
#if CONFIG_ESP_SYSTEM_FLASH_LEAKAGE_WORKAROUND
|
||||||
|
gpio_sleep_set_pull_mode(bootloader_flash_get_cs_io(), GPIO_PULLUP_ONLY);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void esp_sleep_enable_gpio_switch(bool enable)
|
void esp_sleep_enable_gpio_switch(bool enable)
|
||||||
|
Reference in New Issue
Block a user