-
I'm using ESP32S3 board (have two of them and issue seen below is with both) - WT32-SC01 Plus. For programming/debugging the board has a USB port (appears as J-TAG) and also a DEBUG port (requires an additional cable and small debug board, and appears as cu. and tty. ports). I don't know the difference between these but mentioning in case its relevant to the issue. The issue in short is that once I flash MY application through the USB (so not any application) it runs and reach the point it turns on the wifi and then the USB port stop functioning completely (the application continue running, only communication with the board through the USB stops completely). By completely I mean that it no longer allows flashing or monitoring through it, neither using cargo nor idf.py, and this is also after disconnecting the device completely, replacing cables, etc. As if the USB got broken (which is what I thought initially when this happened). After that the only way I can communicate with the board is using the debug port and it works flawlessly. The strange thing is that if I program (through the debug port) a small example program using the idf.py, the USB port comes back to life like new. After that I can program using the USB port both with cargo and with idf.py, as long as it is not my application. So the question is - what is my app doing that could cause this? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Pretty sure the USB port is the serial-jtag port (i.e. not a UART bridge) so you need this: https://github.com/esp-rs/esp-wifi/blob/main/esp-wifi/README.md#usb-serial-jtag TL;DR you need to enable the Your board should also have a BOOT and a RESET button. Holding the BOOT button while resetting the board should get you into a mode which allows you to use the USB with espflash / esptool again |
Beta Was this translation helpful? Give feedback.
-
Unless a feature is enabled, usb is disabled when using WiFi to improve wifi performance: https://github.com/esp-rs/esp-wifi/blob/main/esp-wifi/README.md#usb-serial-jtag. You just need to enable the feature :). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the amazingly quick responses! Yep, that solved it. |
Beta Was this translation helpful? Give feedback.
Pretty sure the USB port is the serial-jtag port (i.e. not a UART bridge) so you need this: https://github.com/esp-rs/esp-wifi/blob/main/esp-wifi/README.md#usb-serial-jtag
TL;DR you need to enable the
phy-enable-usb
featureYour board should also have a BOOT and a RESET button. Holding the BOOT button while resetting the board should get you into a mode which allows you to use the USB with espflash / esptool again