From 5b88da6a21c1a5b53699f093f0328e0f16f8e4e9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 30 Nov 2024 17:37:14 +1100 Subject: [PATCH] hwdef: enable IMU in HolybroG4_GPS IMU rate zero by default --- .../AP_HAL_ChibiOS/hwdef/HolybroG4_GPS/hwdef.dat | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/HolybroG4_GPS/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/HolybroG4_GPS/hwdef.dat index c2d5beca9a0142..9dd7533f6c2a1a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/HolybroG4_GPS/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/HolybroG4_GPS/hwdef.dat @@ -74,9 +74,9 @@ define HAL_I2C_INTERNAL_MASK 3 I2C_ORDER I2C1 I2C2 # one SPI bus (for IMU, unused) -#PA5 SPI1_SCK SPI1 -#PA6 SPI1_MISO SPI1 -#PA7 SPI1_MOSI SPI1 +PA5 SPI1_SCK SPI1 +PA6 SPI1_MISO SPI1 +PA7 SPI1_MOSI SPI1 # SPI CS PC4 GYR_CS CS @@ -134,10 +134,17 @@ DMA_NOSHARE USART3* # add support for moving baseline yaw define GPS_MOVING_BASELINE 1 +SPIDEV icm42688 SPI1 DEVID1 ICM_CS MODE0 24*MHZ 24*MHZ + +IMU Invensensev3 SPI:icm42688 ROTATION_YAW_180 + +define HAL_PERIPH_ENABLE_IMU + # GPS+MAG+LEDs define HAL_PERIPH_ENABLE_GPS define HAL_PERIPH_ENABLE_MAG define HAL_PERIPH_ENABLE_BARO +define HAL_PERIPH_ENABLE_IMU define HAL_PERIPH_ENABLE_NOTIFY define HAL_PERIPH_ENABLE_RC_OUT