spi: bump up to 50MHz

This commit is contained in:
Adeeb Shihadeh
2023-04-05 09:15:31 -07:00
parent e516a5752b
commit 2e8f27486f

View File

@@ -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: