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:
committed by
Michael (XIAO Xufeng)
parent
23e8233506
commit
9100cd558e
@@ -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();
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ extern "C" {
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_ERR_NO_MEM Touch pad init error
|
||||
* - ESP_ERR_NOT_SUPPORTED Touch pad is providing current to external XTAL
|
||||
*/
|
||||
esp_err_t touch_pad_init(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user