Deep Sleep Touch Wake stops working on Tool Chain update from v3.0 to V3.22
Posted: Fri Nov 08, 2019 4:35 am
Hello,
The following code is from my esp32 application which goes into deep sleep and will wake on either a Left / Right Touch, or from the Timer. This is working code that has been running for over a year on previous tool chain versions; most recently V3.0.
Today I upgraded my toolchain to V3.2.2 and recompiled / flashed. Everything seems to work correctly and enters deep sleep mode; however the Touch wake feature no longer works. The timer wake does.
Is there a MenuConfig parameter that I have not set or some new function that is also required to enable touch wake from deep sleep?
Thoughts??
<<<code section - prepare and enter deep sleep
SENS.sar_touch_enable.touch_pad_worken = 0; //this keeps the sleep touch from stimulating all rtc touch pins
touch_pad_init();
touch_pad_config(TOUCH_PAD_NUM5, 0); //Right Touch Off
touch_pad_config(TOUCH_PAD_NUM6, 0); //Left Touch Off
touch_pad_clear_status();
touch_pad_set_voltage(TOUCH_HVOLT_2V4, TOUCH_LVOLT_0V8, TOUCH_HVOLT_ATTEN_0V);
touch_pad_set_meas_time((uint16_t) 20000, (uint16_t) 2048);
touch_pad_config(TOUCH_PAD_NUM5, R_Threshold); //Right Touch Sensitivity
touch_pad_config(TOUCH_PAD_NUM6, L_Threshold); //Left Touch Sensitivity
esp_sleep_enable_touchpad_wakeup();
printf("Enabling timer wakeup, %dS\n",wakeup_time_sec);
esp_sleep_enable_timer_wakeup((uint64_t)(1000000 * (uint64_t)wakeup_time_sec));
vTaskDelay(100 / portTICK_PERIOD_MS);
//Setting deep sleep power down options
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
printf("Entering Touch / Timer deep sleep\n");
esp_deep_sleep_start();
The following code is from my esp32 application which goes into deep sleep and will wake on either a Left / Right Touch, or from the Timer. This is working code that has been running for over a year on previous tool chain versions; most recently V3.0.
Today I upgraded my toolchain to V3.2.2 and recompiled / flashed. Everything seems to work correctly and enters deep sleep mode; however the Touch wake feature no longer works. The timer wake does.
Is there a MenuConfig parameter that I have not set or some new function that is also required to enable touch wake from deep sleep?
Thoughts??
<<<code section - prepare and enter deep sleep
SENS.sar_touch_enable.touch_pad_worken = 0; //this keeps the sleep touch from stimulating all rtc touch pins
touch_pad_init();
touch_pad_config(TOUCH_PAD_NUM5, 0); //Right Touch Off
touch_pad_config(TOUCH_PAD_NUM6, 0); //Left Touch Off
touch_pad_clear_status();
touch_pad_set_voltage(TOUCH_HVOLT_2V4, TOUCH_LVOLT_0V8, TOUCH_HVOLT_ATTEN_0V);
touch_pad_set_meas_time((uint16_t) 20000, (uint16_t) 2048);
touch_pad_config(TOUCH_PAD_NUM5, R_Threshold); //Right Touch Sensitivity
touch_pad_config(TOUCH_PAD_NUM6, L_Threshold); //Left Touch Sensitivity
esp_sleep_enable_touchpad_wakeup();
printf("Enabling timer wakeup, %dS\n",wakeup_time_sec);
esp_sleep_enable_timer_wakeup((uint64_t)(1000000 * (uint64_t)wakeup_time_sec));
vTaskDelay(100 / portTICK_PERIOD_MS);
//Setting deep sleep power down options
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_SLOW_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_FAST_MEM, ESP_PD_OPTION_AUTO);
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_AUTO);
printf("Entering Touch / Timer deep sleep\n");
esp_deep_sleep_start();