Author Topic: ESP32-C3 needs USB unplug/replug to start up after flashing Micropython  (Read 1994 times)

0 Members and 1 Guest are viewing this topic.

Offline kmmTopic starter

  • Regular Contributor
  • *
  • Posts: 51
  • Country: us
I'm working with a board of my own design using an ESP32 C3; just a little Christmas trinket to give to some friends and family, a very simple thing.

It works completely fine once I have mpy flashed, but I haven't been able to fully automate the firmware provisioning because the board stops responding after flashing. It's not dead and comes up just fine after physically unplugging and replugging the USB, but I'd like to get a workflow going where I can plug a board in and get python and my application code installed with one `make deploy`. I don't have any issues with USB connectivity after mpy has been flashed and the board power cycled, I've had several of these things running for a couple days with no freezes or crashes, and all the parameters I've measured look good (+3.3V rail is at +3.3V, oscillator is wiggling at 40.0MHz, etc). I don't think it's a problem with the hardware unless it's a silicon bug in either my PC's USB host or the C3's USB debug block.

I'm using `esptool` and `ampy` to do this (suggestions of other tools are welcome) and have tried all the software-driven reset mechanisms I'm aware of, `--after hard_reset` flag to esptool when flashing, `ampy reset`, and the `usbreset` linux command to reset the interface on my PC, but none seem to give it the thwack it needs to start up without a power cycle (or perhaps just USB re-association) after being flashed.

Anyone have any suggestions or seen a problem like this before with the 'C3 and its built in USB debug interface? I've attached the (janky) makefile I'm using for reference as to what I'm doing.
 

Offline Chicane

  • Contributor
  • Posts: 39
  • Country: us
Re: ESP32-C3 needs USB unplug/replug to start up after flashing Micropython
« Reply #1 on: December 16, 2024, 01:51:35 pm »
Completely normal behavior for C3. Hit Reset button after programming and will run your code.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->