ESP32 board appears to freeze/unfreeze when USB port disconnected/connected

tlaritz
Posts: 9
Joined: Tue Mar 15, 2022 3:01 am

ESP32 board appears to freeze/unfreeze when USB port disconnected/connected

Postby tlaritz » Thu May 12, 2022 5:08 pm

Hi

Not sure if this is a HW problem or not. I'll start here.

My board (see here for schematic: https://copperhilltech.com/content/ESP32_CAN_rev_B.pdf) is acting as a CANbus/Wifi gateway. (I am using Espressif IDE for writing the C++ application code.) The gateway listens for CAN frames on its CANbus interfaces, then buffers them up and sends them via WiFi to my iPhone.

The board can be powered via USB or via 12v. When I power the board using +12v, the board appears to freeze (ie, no longer forwards CAN frames to WiFi) when I disconnect the USB bus from my laptop. Note that gateway is not receiving power over this USB and the corresponding com port on the laptop is disabled. If I reconnect the gateway's USB, frames flow again. I can cycle repeatedly between the non-freezed (ie, USB disconnected) and frozen states.

My app using ESP_LOGx messages, and I currently have the logging level set to None. The None setting appears to mean that ESP_LOGx messages are sent for only about 1 second after booting the board.

(Note: I am actually connecting the gateway to a 4-way USB splitter which is connected to my laptop. This splitter allows me to control power to individual ports. This feature is allowing me to prevent the USB from supplying power to the board.)

Short of some kind of flow control issue, it is hard to understand how connecting/disconnecting the USB could effect the application's operation. I'm pretty baffled.

liebman
Posts: 18
Joined: Wed Dec 09, 2020 7:03 pm

Re: ESP32 board appears to freeze/unfreeze when USB port disconnected/connected

Postby liebman » Thu May 12, 2022 5:27 pm

Maybe something happens with the DTR & RTS signals at disconnection?

Ferrin13
Posts: 1
Joined: Fri Jan 06, 2023 6:14 pm

Re: ESP32 board appears to freeze/unfreeze when USB port disconnected/connected

Postby Ferrin13 » Fri Jan 06, 2023 6:18 pm

I know this is pretty old, but I just had this same problem. The issue was that my ground from the board was incorrectly wired. With the USB port connected it acted as a ground, but as soon as it disconnected there was no longer a ground and the board crashed.

Who is online

Users browsing this forum: No registered users and 49 guests