From 4c3fb5376fa91914c21ebe4d88170b0e6023c3a3 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 4 Dec 2024 10:53:41 -0800 Subject: [PATCH] fix up USB/SPI race condition in flasher script --- tests/reflash_internal_panda.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/reflash_internal_panda.py b/tests/reflash_internal_panda.py index c2ad9f8964..461e516f31 100755 --- a/tests/reflash_internal_panda.py +++ b/tests/reflash_internal_panda.py @@ -30,10 +30,10 @@ 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() @@ -41,7 +41,7 @@ def gpio_set(pin, high): 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()