Auto USB Programming (Devkit V1)

bkgoodman
Posts: 45
Joined: Fri Feb 17, 2017 12:41 pm

Auto USB Programming (Devkit V1)

Postby bkgoodman » Sat Jan 30, 2021 10:19 pm

I have many Devkit V1 modules. I've bought them from a couple of different vendors, at different times. I have always have to go through the rigmarole of sequencing the EN and Boot buttons ever time I want to reflash. The modules - to my knowledge should have the DTR/DTS transistors to automatically sequence these buttons when flashing via USB.

But latley - for no reason I can comprehend - I no longer have to do this. I have no idea why. I did do a IDF 4.2 upgrade recently (on a couple of machines?) and earlier ones may have been 4.2 pre-release - but I can't quite figure it out.

So my questions are - did something change in IDF to make this better? Is there a way the behavior of this can be influenced in software (i.e. menuconfig)? Any chance it could be something odder, like some/older Windows USB serial drivers having poorer support for handshaking lines??

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Auto USB Programming (Devkit V1)

Postby ESP_Sprite » Mon Feb 01, 2021 3:39 am

Potentially, yes. The usual reason for the auto-reset circuit not working is that the timing of the system controlling it (in other words, the stack of your operating system, your serial drivers, PySerial and esptool.py) is not exactly correct. If any of those change, the timing may improve and it'll work again.

bkgoodman
Posts: 45
Joined: Fri Feb 17, 2017 12:41 pm

Re: Auto USB Programming (Devkit V1)

Postby bkgoodman » Sun Feb 07, 2021 6:42 pm

So - any particulars you know of on how to fix? I just moved environments yet again - and (aside from some irregularities in baud rate settings) - I am seeing that esptool appears to hold the board in reset properly (automatically) - as my program appears to "Pause" going into flash - but it will just error in a "timeout awaiting packet headers" unless I press the buttons manually. i.e. It's automatically pressing the RESET but not the (other one).

My machine is an Ubuntu 20.04.1

ESP_Sprite
Posts: 9594
Joined: Thu Nov 26, 2015 4:08 am

Re: Auto USB Programming (Devkit V1)

Postby ESP_Sprite » Mon Feb 08, 2021 1:55 am

You can try varying the capacitance from EN to gnd on your devboard... some people had luck adding an 1uF cap to ground there.

Who is online

Users browsing this forum: No registered users and 157 guests