Skip to content

Fix CDC+JTAG is disabled when WiFi is used on ESP32-C3 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions libraries/WiFi/src/WiFiGeneric.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,10 @@ void WiFiGenericClass::useStaticBuffers(bool 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){
if(!lowLevelInitDone){
Expand Down Expand Up @@ -587,6 +591,10 @@ bool wifiLowLevelInit(bool persistent){
lowLevelInitDone = false;
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){
lowLevelInitDone = esp_wifi_set_storage(WIFI_STORAGE_RAM) == ESP_OK;
}
Expand Down