Unverified Commit 05d8cdde authored by Me No Dev's avatar Me No Dev Committed by GitHub

Fix CDC+JTAG is disabled when WiFi is used on ESP32-C3 (#6287)

Fixes: https://github.com/espressif/arduino-esp32/issues/6264
Thanks @Spritetm
parent c4954dd5
...@@ -555,6 +555,10 @@ void WiFiGenericClass::useStaticBuffers(bool bufferMode){ ...@@ -555,6 +555,10 @@ void WiFiGenericClass::useStaticBuffers(bool bufferMode){
_wifiUseStaticBuffers = bufferMode; _wifiUseStaticBuffers = bufferMode;
} }
// Temporary fix to ensure that CDC+JTAG stay on on ESP32-C3
#if CONFIG_IDF_TARGET_ESP32C3
extern "C" void phy_bbpll_en_usb(bool en);
#endif
bool wifiLowLevelInit(bool persistent){ bool wifiLowLevelInit(bool persistent){
if(!lowLevelInitDone){ if(!lowLevelInitDone){
...@@ -587,6 +591,10 @@ bool wifiLowLevelInit(bool persistent){ ...@@ -587,6 +591,10 @@ bool wifiLowLevelInit(bool persistent){
lowLevelInitDone = false; lowLevelInitDone = false;
return lowLevelInitDone; return lowLevelInitDone;
} }
// Temporary fix to ensure that CDC+JTAG stay on on ESP32-C3
#if CONFIG_IDF_TARGET_ESP32C3
phy_bbpll_en_usb(true);
#endif
if(!persistent){ if(!persistent){
lowLevelInitDone = esp_wifi_set_storage(WIFI_STORAGE_RAM) == ESP_OK; lowLevelInitDone = esp_wifi_set_storage(WIFI_STORAGE_RAM) == ESP_OK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment