From 1dad7b2d566940bc3d19b121907d5829bc034b2d Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Mon, 20 Dec 2021 16:16:10 -0300 Subject: [PATCH] HAL_Linux: update SPI speeds for Navigator As @jaxxzer found out, if SCL goes under 1MHz, the MMC sometimes glitches out, freezing. --- libraries/AP_HAL_Linux/SPIDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_HAL_Linux/SPIDevice.cpp b/libraries/AP_HAL_Linux/SPIDevice.cpp index 6f1a87c9c7..4d3e922561 100644 --- a/libraries/AP_HAL_Linux/SPIDevice.cpp +++ b/libraries/AP_HAL_Linux/SPIDevice.cpp @@ -80,8 +80,8 @@ SPIDesc SPIDeviceManager::_device[] = { #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIGATOR SPIDesc SPIDeviceManager::_device[] = { SPIDesc("led", 0, 0, SPI_MODE_0, 8, SPI_CS_KERNEL, 6*MHZ, 6*MHZ), - SPIDesc("icm20602", 1, 2, SPI_MODE_0, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ), - SPIDesc("mmc5983", 1, 1, SPI_MODE_0, 8, SPI_CS_KERNEL, 1*MHZ, 10*MHZ), + SPIDesc("icm20602", 1, 2, SPI_MODE_0, 8, SPI_CS_KERNEL, 4*MHZ, 10*MHZ), + SPIDesc("mmc5983", 1, 1, SPI_MODE_0, 8, SPI_CS_KERNEL, 4*MHZ, 10*MHZ), }; #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2 SPIDesc SPIDeviceManager::_device[] = {