Skip to content

Commit

Permalink
Fix SONOFF chip reset after flashing
Browse files Browse the repository at this point in the history
The chip will return to the bootloader after cmdReset if the bootloader
pin is not de-asserted after entering the bootloader. To fix this, this
patch de-asserts the bootloader pin after a delay.
  • Loading branch information
sultanqasim committed Jun 7, 2024
1 parent 0142853 commit a094a8d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cc2538-bsl.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ def invoke_bootloader(self, dtr_active_high=False, inverted=False, sonoff_usb=Fa

set_bootloader_pin(1)
set_reset_pin(0)

# wait to enter bootloader, then deassert bootloader pin
time.sleep(0.002)
set_reset_pin(1)
else:
set_bootloader_pin(1 if not dtr_active_high else 0)
set_reset_pin(0)
Expand Down

0 comments on commit a094a8d

Please sign in to comment.