File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -421,12 +421,20 @@ def upload(args, verboseprint):
421421 with serial .Serial (args .port , args .baud , timeout = connection_timeout ) as ser :
422422 #DTR is driven low when serial port open. DTR has now pulled RST low.
423423
424- time .sleep (0.008 ) #3ms and 10ms work well. Not 50, and not 0.
424+ time .sleep (0.01 ) #3ms and 10ms work well. Not 50, and not 0.
425425
426426 #Setting RTS/DTR high causes the bootload pin to go high, then fall across 100ms
427427 ser .setDTR (0 ) #Set DTR high
428428 ser .setRTS (0 ) #Set RTS high - support the CH340E
429429
430+ time .sleep (0.01 ) #A double-reset seems to work best on macOS
431+ ser .setDTR (1 )
432+ ser .setRTS (1 )
433+
434+ time .sleep (0.01 )
435+ ser .setDTR (0 )
436+ ser .setRTS (0 )
437+
430438 #Give bootloader a chance to run and check bootload pin before communication begins. But must initiate com before bootloader timeout of 250ms.
431439 time .sleep (0.100 ) #100ms works well
432440
You can’t perform that action at this time.
0 commit comments