File tree 1 file changed +9
-1
lines changed
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):
421
421
with serial .Serial (args .port , args .baud , timeout = connection_timeout ) as ser :
422
422
#DTR is driven low when serial port open. DTR has now pulled RST low.
423
423
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.
425
425
426
426
#Setting RTS/DTR high causes the bootload pin to go high, then fall across 100ms
427
427
ser .setDTR (0 ) #Set DTR high
428
428
ser .setRTS (0 ) #Set RTS high - support the CH340E
429
429
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
+
430
438
#Give bootloader a chance to run and check bootload pin before communication begins. But must initiate com before bootloader timeout of 250ms.
431
439
time .sleep (0.100 ) #100ms works well
432
440
You can’t perform that action at this time.
0 commit comments