Skip to content

Commit

Permalink
fix up USB/SPI race condition in flasher script
Browse files Browse the repository at this point in the history
  • Loading branch information
adeebshihadeh authored Dec 4, 2024
1 parent c7cc2de commit 4c3fb53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/reflash_internal_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ def gpio_set(pin, high):
print("resetting into DFU")
gpio_set(GPIO.STM_RST_N, 1)
gpio_set(GPIO.STM_BOOT0, 1)
time.sleep(1)
time.sleep(0.5)
gpio_set(GPIO.STM_RST_N, 0)
gpio_set(GPIO.STM_BOOT0, 0)
time.sleep(1)
assert Panda.wait_for_dfu(None, timeout=10)

print("flashing bootstub")
PandaDFU(None).recover()

gpio_set(GPIO.STM_RST_N, 1)
time.sleep(0.5)
gpio_set(GPIO.STM_RST_N, 0)
time.sleep(1)
assert Panda.wait_for_panda(None, timeout=10)

print("flashing app")
p = Panda()
Expand Down

0 comments on commit 4c3fb53

Please sign in to comment.