ESP32 TinyPICO web server

Hi all - I am using a TinyPICO ESP32 as a web server and wifi access point in a kind of local automation project. When active it generates a wifi signal that I can connect to with a phone or pc and then I can navigate to a web page and see some setting and data from the ESP32. This all works fine as long as I have the serial debugging cable connected.
But if I disconnect the serial cable and run the ESP32 from a battery, the web server doesn't work!
I can't figure out why having the serial cable plugged in makes it work as the board has power either way.
Could there ne something in one of the library files that requires the serial monitor to be connected? Any suggestions please.

Presumably, the serial debug goes through a native USB?

That could mean that the data sits there witing for a USB connection - which blocks your code execution?

That is along the lines of what I was thinking but I have just discovered something new. I was putting the ESP32 into sleep mode whilst the server is not active and wake it up with an input pin pulled low to activate the server.
I just stripped out the sleep code and ran the server code alone and it works with or without the serial debug cable connected. So it seems to be something to do with activating the sleep mode or the wake-up by interrupt on pin IO32.

After further investigation, I've learned that when I try the stripped down code (web server only no sleep state) with the TinyPICO, the web server works when USB 5V is applied either from the USB cable or from an external 4.2V source (USB cable removed). But it does not work if the power is supplied via the VBAT input.

On the diagram USB = VBUS = 5V
So it seems like a hardware problem with the TinyPICO but I can't see that the 5V goes anywhere other than the charging circuit on the diagram.
Has anybody got any ideas?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.