forked from espressif/esp-idf
Merge branch 'bugfix/disable_touch_sleep_s3_v4.4' into 'release/v4.4'
touch_sensor: forbid from using touch sensor with sleep on ESP32-S3 (v4.4) See merge request espressif/esp-idf!17579
This commit is contained in:
@ -248,6 +248,10 @@ esp_err_t touch_pad_config(touch_pad_t touch_num)
|
|||||||
|
|
||||||
esp_err_t touch_pad_init(void)
|
esp_err_t touch_pad_init(void)
|
||||||
{
|
{
|
||||||
|
//TODO: IDF-4813
|
||||||
|
extern bool esp_no_sleep;
|
||||||
|
esp_no_sleep = true;
|
||||||
|
|
||||||
if (rtc_touch_mux == NULL) {
|
if (rtc_touch_mux == NULL) {
|
||||||
rtc_touch_mux = xSemaphoreCreateMutex();
|
rtc_touch_mux = xSemaphoreCreateMutex();
|
||||||
}
|
}
|
||||||
|
@ -357,8 +357,17 @@ inline static void IRAM_ATTR misc_modules_wake_prepare(void)
|
|||||||
|
|
||||||
inline static uint32_t IRAM_ATTR call_rtc_sleep_start(uint32_t reject_triggers, uint32_t lslp_mem_inf_fpu);
|
inline static uint32_t IRAM_ATTR call_rtc_sleep_start(uint32_t reject_triggers, uint32_t lslp_mem_inf_fpu);
|
||||||
|
|
||||||
|
//TODO: IDF-4813
|
||||||
|
bool esp_no_sleep = false;
|
||||||
|
|
||||||
static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
|
static uint32_t IRAM_ATTR esp_sleep_start(uint32_t pd_flags)
|
||||||
{
|
{
|
||||||
|
#if CONFIG_IDF_TARGET_ESP32S3
|
||||||
|
if (esp_no_sleep) {
|
||||||
|
ESP_EARLY_LOGE(TAG, "Sleep cannot be used with Touch/ULP for now.");
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
#endif //CONFIG_IDF_TARGET_ESP32S3
|
||||||
// Stop UART output so that output is not lost due to APB frequency change.
|
// Stop UART output so that output is not lost due to APB frequency change.
|
||||||
// For light sleep, suspend UART output — it will resume after wakeup.
|
// For light sleep, suspend UART output — it will resume after wakeup.
|
||||||
// For deep sleep, wait for the contents of UART FIFO to be sent.
|
// For deep sleep, wait for the contents of UART FIFO to be sent.
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
| Supported Targets | ESP32 | ESP32-S2 | ESP32-C3 |
|
||||||
|
| ----------------- | ----- | -------- | -------- |
|
||||||
|
|
||||||
# Deep Sleep Example
|
# Deep Sleep Example
|
||||||
|
|
||||||
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
(See the README.md file in the upper level 'examples' directory for more information about examples.)
|
||||||
|
@ -3,7 +3,7 @@ menu "Example Configuration"
|
|||||||
config EXAMPLE_TOUCH_WAKEUP
|
config EXAMPLE_TOUCH_WAKEUP
|
||||||
bool "Enable touch wake up"
|
bool "Enable touch wake up"
|
||||||
default y
|
default y
|
||||||
depends on !IDF_TARGET_ESP32C3
|
depends on !IDF_TARGET_ESP32C3 && !IDF_TARGET_ESP32S3
|
||||||
help
|
help
|
||||||
This option enables wake up from deep sleep using touch pads
|
This option enables wake up from deep sleep using touch pads
|
||||||
TOUCH8 and TOUCH9, which correspond to GPIO33 and GPIO32.
|
TOUCH8 and TOUCH9, which correspond to GPIO33 and GPIO32.
|
||||||
@ -33,8 +33,8 @@ menu "Example Configuration"
|
|||||||
default y
|
default y
|
||||||
depends on IDF_TARGET_ESP32C3
|
depends on IDF_TARGET_ESP32C3
|
||||||
help
|
help
|
||||||
This option enables wake up from GPIO, only GPIO0~5 can be used to wake up. Be aware that if you use low level
|
This option enables wake up from GPIO, only GPIO0~5 can be used to wake up. Be aware that if you use low
|
||||||
to trigger wakeup, we strongly recommand you to connect external pull-up resistance.
|
level to trigger wakeup, we strongly recommand you to connect external pull-up resistance.
|
||||||
|
|
||||||
menu "GPIO wakeup configuration"
|
menu "GPIO wakeup configuration"
|
||||||
visible if IDF_TARGET_ESP32C3
|
visible if IDF_TARGET_ESP32C3
|
||||||
|
Reference in New Issue
Block a user