From 8b34d547acb5ca55707df296ff8dae4adf9a36e4 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 6 Jan 2023 06:18:17 +0100 Subject: [PATCH] cpu/esp32: fix SDK configuration for USB PHY When using USB Serial/JTAG/OTG/CDC, USB should be enabled in `phy_init`, otherwise USB interface is not working properly. --- cpu/esp32/include/sdkconfig_esp32c3.h | 5 +++++ cpu/esp32/include/sdkconfig_esp32s3.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cpu/esp32/include/sdkconfig_esp32c3.h b/cpu/esp32/include/sdkconfig_esp32c3.h index 28afc09fb5..f4f0d47068 100644 --- a/cpu/esp32/include/sdkconfig_esp32c3.h +++ b/cpu/esp32/include/sdkconfig_esp32c3.h @@ -94,6 +94,11 @@ extern "C" { #define CONFIG_ESP_SLEEP_POWER_DOWN_FLASH 1 #define CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND 1 +/** + * ESP32-C3 specific USB configuration + */ +#define CONFIG_ESP_PHY_ENABLE_USB 1 + /** * ESP32-C3 BLE driver configuration (DO NOT CHANGE) */ diff --git a/cpu/esp32/include/sdkconfig_esp32s3.h b/cpu/esp32/include/sdkconfig_esp32s3.h index d8be6c4437..d6e50c0efd 100644 --- a/cpu/esp32/include/sdkconfig_esp32s3.h +++ b/cpu/esp32/include/sdkconfig_esp32s3.h @@ -109,8 +109,8 @@ extern "C" { /** * ESP32-S3 specific USB configuration */ -#ifdef MODULE_ESP_IDF_USB #define CONFIG_ESP_PHY_ENABLE_USB 1 +#ifdef MODULE_ESP_IDF_USB #define CONFIG_USB_OTG_SUPPORTED 1 #endif