Skip to content

KAKUTEH7WING: add LSM6DXX IMU support - #12202

Open
zebulon-86 wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
zebulon-86:pr/kakuteh7wing-lsm6dxx
Open

zebulon-86 wants to merge 1 commit into
iNavFlight:maintenance-10.xfrom
zebulon-86:pr/kakuteh7wing-lsm6dxx

Conversation

@zebulon-86

Copy link
Copy Markdown

Enable the LSM6DXX driver on KAKUTEH7WING for board revisions fitted with an LSM6DSV16X or LSM6DSK320X instead of the ICM42688P.

The ST IMU shares the same SPI3 bus, CS (PE12), EXTI (PE15), and alignment (CW90_DEG) as the existing ICM42605/42688 entry, and is selected via WHO_AM_I during gyro autodetect.

Validation

Bench-tested on hardware (no flight test yet):

  • LSM6DS series (LSM6DSV16X / LSM6DSK320X): Gyro/acc detection (LSM6DXX), 6-point accelerometer calibration, settings persistence across reboot, and Configurator model orientation verified.
image
  • ICM42688P (original revision): Confirmed no regression; detects ICM42605 as before.
image

@qodo-code-review

Copy link
Copy Markdown
Contributor

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Add LSM6DXX support to KAKUTEH7WING

✨ Enhancement ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Enable LSM6DSV16X and LSM6DSK320X detection on KAKUTEH7WING board revisions using ST IMUs.
• Share the existing SPI3 pins and alignment while preserving ICM42688P detection on original
 revisions.
Diagram

graph TD
  Config["Board IMU settings"] --> Registry["SPI device registry"] --> SPI["Shared SPI3 pins"] --> Detect{"Gyro autodetect"} -->|"ICM identity"| ICM["ICM42605 driver"]
  Detect -->|"ST identity"| LSM["LSM6DXX driver"]
Loading
High-Level Assessment

Registering another candidate for the existing SPI3 IMU position reuses the LSM6DXX driver and gyro autodetection without splitting firmware by board revision. Separate revision-specific builds would add maintenance without a clear benefit.

Files changed (2) +9 / -0

Enhancement (1) +1 / -0
target.cRegister LSM6DXX as a SPI3 IMU candidate +1/-0

Register LSM6DXX as a SPI3 IMU candidate

• Adds an LSM6DXX bus-device descriptor in the same IMU slot as the existing ICM entry, using the board-defined bus, chip-select, interrupt, and alignment settings.

src/main/target/KAKUTEH7WING/target.c

Other (1) +8 / -0
target.hEnable LSM6DXX with shared IMU pin mapping +8/-0

Enable LSM6DXX with shared IMU pin mapping

• Enables the existing LSM6DXX driver and assigns SPI3, PE12, PE15, and CW90_DEG alignment to ST-equipped revisions. Comments clarify how the ST and ICM variants are handled.

src/main/target/KAKUTEH7WING/target.h

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant