ESP32: Fix xtal 32k not oscillate or oscillate too slowly issue

ESP32 in revision0 and revision1 uses touchpad to provide
current to oscillate xtal 32k. But revision2 and revision3
do not need to do that.
Note: touchpad can not work and toupad/ULP wakeup sources
are not available when toupad provides current to xtal 32k
This commit is contained in:
chaijie
2020-09-18 17:23:28 +08:00
committed by Michael (XIAO Xufeng)
parent 23e8233506
commit 9100cd558e
10 changed files with 99 additions and 33 deletions

View File

@@ -151,7 +151,7 @@ void app_main(void)
{
// Initialize touch pad peripheral, it will start a timer to run a filter
ESP_LOGI(TAG, "Initializing touch pad");
touch_pad_init();
ESP_ERROR_CHECK(touch_pad_init());
// If use interrupt trigger mode, should set touch sensor FSM mode at 'TOUCH_FSM_MODE_TIMER'.
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
// Set reference voltage for charging/discharging

View File

@@ -57,7 +57,7 @@ void app_main(void)
{
// Initialize touch pad peripheral.
// The default fsm mode is software trigger mode.
touch_pad_init();
ESP_ERROR_CHECK(touch_pad_init());
// Set reference voltage for charging/discharging
// In this case, the high reference valtage will be 2.7V - 1V = 1.7V
// The low reference voltage will be 0.5

View File

@@ -155,7 +155,7 @@ void app_main(void)
#if CONFIG_IDF_TARGET_ESP32
// Initialize touch pad peripheral.
// The default fsm mode is software trigger mode.
touch_pad_init();
ESP_ERROR_CHECK(touch_pad_init());
// If use touch pad wake up, should set touch sensor FSM mode at 'TOUCH_FSM_MODE_TIMER'.
touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
// Set reference voltage for charging/discharging