mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-06 19:32:52 +08:00
* Add invensense3_456 driver for ICM45686 IMU * Add support for 9th SPI slave * Add SPI_SLAVE9 with PG01 as Chip Select on Cube Orange Used in the Cube Orange Plus LTS / "shiny" release for the non-isolated IMU (on SPI bus 1) * Add cube_orangeplus_lts board with new ICM45686 IMUs
86 lines
3.9 KiB
XML
86 lines
3.9 KiB
XML
<!DOCTYPE module SYSTEM "module.dtd">
|
|
|
|
<module name="imu_cube" dir="imu" task="sensors">
|
|
<doc>
|
|
<description>
|
|
IMU driver for the sensors inside the cube autopilots
|
|
- IMU1: ICM20948 (non-isolated)
|
|
- IMU2: ICM20602 (isolated)
|
|
- IMU3: ICM20649 (isolated)
|
|
</description>
|
|
</doc>
|
|
<dep>
|
|
<depends>spi_master,i2c,imu_common,intermcu_iomcu,imu_heater</depends>
|
|
<provides>imu</provides>
|
|
</dep>
|
|
<header>
|
|
<file name="imu_cube.h"/>
|
|
</header>
|
|
<init fun="imu_cube_init()"/>
|
|
<periodic fun="imu_cube_periodic()"/>
|
|
<event fun="imu_cube_event()"/>
|
|
<makefile target="!sim|nps|fbw">
|
|
<!-- ICM20948 (non-isolated) or ICM45686 (non-isolated, Cube+ LTS) -->
|
|
<configure name="CUBE_IMU1_SPI_DEV" default="spi1" case="lower|upper"/>
|
|
<configure name="CUBE_IMU1_SPI_SLAVE_IDX" default="SPI_SLAVE2"/> <!-- Overwritten to SPI_SLAVE9 for the cube+ LTS -->
|
|
<define name="CUBE_IMU1_SPI_DEV" value="$(CUBE_IMU1_SPI_DEV_LOWER)"/>
|
|
<define name="USE_$(CUBE_IMU1_SPI_DEV_UPPER)"/>
|
|
<define name="CUBE_IMU1_SPI_SLAVE_IDX" value="$(CUBE_IMU1_SPI_SLAVE_IDX)"/>
|
|
<define name="USE_$(CUBE_IMU1_SPI_SLAVE_IDX)"/>
|
|
|
|
<!-- ICM20602 or ICM45686 (isolated) or ICM45686 (isolated, Cube+ LTS) -->
|
|
<configure name="CUBE_IMU2_SPI_DEV" default="spi4" case="lower|upper"/>
|
|
<configure name="CUBE_IMU2_SPI_SLAVE_IDX" default="SPI_SLAVE3"/> <!-- Overwritten to SPI_SLAVE5 for cube+ (non-LTS) -->
|
|
<define name="CUBE_IMU2_SPI_DEV" value="$(CUBE_IMU2_SPI_DEV_LOWER)"/>
|
|
<define name="USE_$(CUBE_IMU2_SPI_DEV_UPPER)"/>
|
|
<define name="CUBE_IMU2_SPI_SLAVE_IDX" value="$(CUBE_IMU2_SPI_SLAVE_IDX)"/>
|
|
<define name="USE_$(CUBE_IMU2_SPI_SLAVE_IDX)"/>
|
|
|
|
<!-- ICM20649 (isolated) or ICM45686 (isolated, Cube+ LTS) -->
|
|
<configure name="CUBE_IMU3_SPI_DEV" default="spi4" case="lower|upper"/>
|
|
<configure name="CUBE_IMU3_SPI_SLAVE_IDX" default="SPI_SLAVE8"/>
|
|
<define name="CUBE_IMU3_SPI_DEV" value="$(CUBE_IMU3_SPI_DEV_LOWER)"/> <!-- Overwritten to SPI_SLAVE5 for the cube+ LTS -->
|
|
<define name="USE_$(CUBE_IMU3_SPI_DEV_UPPER)"/>
|
|
<define name="CUBE_IMU3_SPI_SLAVE_IDX" value="$(CUBE_IMU3_SPI_SLAVE_IDX)"/>
|
|
<define name="USE_$(CUBE_IMU3_SPI_SLAVE_IDX)"/>
|
|
|
|
<!-- Configure the heater (ICM20602) -->
|
|
<define name="IMU_HEATER_GYRO_ID" value="IMU_CUBE2_ID"/>
|
|
<define name="IMU_HEATER_TARGET_TEMP" value="45.0"/>
|
|
<define name="IMU_HEATER_P_GAIN" value="50.0"/>
|
|
<define name="IMU_HEATER_I_GAIN" value="0.07"/>
|
|
|
|
<!-- Different IMU for the cube+ -->
|
|
<define name="IMU_CUBE_ORANGEPLUS" value="TRUE" cond="ifeq ($(BOARD_VERSION), orange_plus)"/>
|
|
|
|
<!-- Triple ICM45686 for the Cube+ LTS / "shiny" cube" -->
|
|
<define name="IMU_CUBE_ORANGEPLUS_LTS" value="TRUE" cond="ifeq ($(BOARD_VERSION), orange_plus_lts)"/>
|
|
|
|
<file name="invensense2.c" dir="peripherals" cond="ifneq ($(BOARD_VERSION), orange_plus_lts)"/>
|
|
<file name="invensense3.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange_plus)"/>
|
|
<file name="invensense3_456.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange_plus_lts)"/>
|
|
|
|
<file name="mpu60x0.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange)"/>
|
|
<file name="mpu60x0_spi.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange)"/>
|
|
|
|
<file name="imu_cube.c"/>
|
|
|
|
<test>
|
|
<define name="SPI_MASTER"/>
|
|
<define name="CUBE_IMU1_SPI_DEV" value="spi1"/>
|
|
<define name="CUBE_IMU1_SPI_SLAVE_IDX" value="0"/>
|
|
<define name="CUBE_IMU2_SPI_DEV" value="spi4"/>
|
|
<define name="CUBE_IMU2_SPI_SLAVE_IDX" value="1"/>
|
|
<define name="CUBE_IMU3_SPI_DEV" value="spi4"/>
|
|
<define name="CUBE_IMU3_SPI_SLAVE_IDX" value="2"/>
|
|
<define name="USE_SPI1"/>
|
|
<define name="USE_SPI4"/>
|
|
<define name="USE_SPI_SLAVE0"/>
|
|
<define name="USE_SPI_SLAVE2"/>
|
|
<define name="USE_SPI_SLAVE2"/>
|
|
<define name="PERIODIC_FREQUENCY" value="512"/>
|
|
<define name="IMU_CUBE_PERIODIC_FREQ" value="512"/>
|
|
</test>
|
|
</makefile>
|
|
</module>
|