From 2b70e283c17e8e661f471cfe7994dfca8a4457d3 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 3 May 2024 14:03:54 -0700 Subject: [PATCH] tres: lower SOM reset timeout (#1945) * tres: lower SOM reset timeout * update test --- board/drivers/bootkick.h | 2 +- python/__init__.py | 1 + tests/som/test_bootkick.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/board/drivers/bootkick.h b/board/drivers/bootkick.h index acae3616a..4b75f0908 100644 --- a/board/drivers/bootkick.h +++ b/board/drivers/bootkick.h @@ -29,7 +29,7 @@ void bootkick_tick(bool ignition, bool recent_heartbeat) { * once BOOT_RESET is triggered, it stays until countdown is finished */ if (!bootkick_reset_triggered && (boot_state == BOOT_BOOTKICK) && (boot_state_prev == BOOT_STANDBY)) { - waiting_to_boot_countdown = 45U; + waiting_to_boot_countdown = 20U; } if (waiting_to_boot_countdown > 0U) { bool serial_activity = uart_ring_som_debug.w_ptr_tx != bootkick_last_serial_ptr; diff --git a/python/__init__.py b/python/__init__.py index 8567118f2..a18fdc5f9 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -362,6 +362,7 @@ class Panda: this_serial = device.getSerialNumber() except Exception: logging.exception("failed to get serial number of panda") + continue if serial is None or this_serial == serial: logging.debug("opening device %s %s", this_serial, hex(device.getProductID())) diff --git a/tests/som/test_bootkick.py b/tests/som/test_bootkick.py index 98d3f95b8..324d24929 100644 --- a/tests/som/test_bootkick.py +++ b/tests/som/test_bootkick.py @@ -145,7 +145,7 @@ def test_recovery_from_qdl(p, pj): pj.set_header_pin(i, 0) # normally, this GPIO is set immediately since it's first enabled in the ABL - for i in range(40): + for i in range(17): assert not p.read_som_gpio() time.sleep(1)