From 2e8f27486f1522db6d442fb9e9c261a0a2eee1d2 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 5 Apr 2023 09:15:31 -0700 Subject: [PATCH] spi: bump up to 50MHz --- python/spi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/spi.py b/python/spi.py index 0ff15c3b..b742f28f 100644 --- a/python/spi.py +++ b/python/spi.py @@ -58,7 +58,7 @@ class SpiDevice: """ Provides locked, thread-safe access to a panda's SPI interface. """ - def __init__(self, speed=30000000): + def __init__(self, speed): if not os.path.exists(DEV_PATH): raise PandaSpiUnavailable(f"SPI device not found: {DEV_PATH}") if spidev is None: @@ -87,7 +87,9 @@ class PandaSpiHandle(BaseHandle): A class that mimics a libusb1 handle for panda SPI communications. """ def __init__(self): - self.dev = SpiDevice() + # 50MHz is the max of the 845. older rev comma three + # may not support the full 50MHz + self.dev = SpiDevice(50000000) # helpers def _calc_checksum(self, data: List[int]) -> int: