From 1b2cb4e7a569962f09d36ecd3236f1f91ed18f29 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 6 Apr 2023 12:51:30 -0700 Subject: [PATCH] boardd: bump spi to 50MHz old-commit-hash: 71819b2282919b95616a986e58ddb91996826075 --- selfdrive/boardd/spi.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/selfdrive/boardd/spi.cc b/selfdrive/boardd/spi.cc index 9a10e30f9..d418d2bda 100644 --- a/selfdrive/boardd/spi.cc +++ b/selfdrive/boardd/spi.cc @@ -57,9 +57,12 @@ PandaSpiHandle::PandaSpiHandle(std::string serial) : PandaCommsHandle(serial) { uint8_t uid[uid_len] = {0}; uint32_t spi_mode = SPI_MODE_0; - uint32_t spi_speed = 30000000; uint8_t spi_bits_per_word = 8; + // 50MHz is the max of the 845. note that some older + // revs of the comma three may not support this speed + uint32_t spi_speed = 50000000; + spi_fd = open(SPI_DEVICE.c_str(), O_RDWR); if (spi_fd < 0) { LOGE("failed opening SPI device %d", spi_fd);