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

@@ -276,6 +276,10 @@ esp_err_t touch_pad_config(touch_pad_t touch_num, uint16_t threshold)
esp_err_t touch_pad_init(void)
{
#ifdef CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_V2
ESP_LOGE(TOUCH_TAG, "Touch Pad can't work because it provides current to external XTAL");
return ESP_ERR_NOT_SUPPORTED;
#endif // CONFIG_ESP32_RTC_EXT_CRYST_ADDIT_CURRENT_V2
if (rtc_touch_mux == NULL) {
rtc_touch_mux = xSemaphoreCreateMutex();
}