Skip to content

KAKUTEH7: add LSM6DSK320X support#1122

Open
zebulon-86 wants to merge 2 commits into
betaflight:masterfrom
zebulon-86:kakuteh7-lsm6dsv-dsk320x
Open

KAKUTEH7: add LSM6DSK320X support#1122
zebulon-86 wants to merge 2 commits into
betaflight:masterfrom
zebulon-86:kakuteh7-lsm6dsv-dsk320x

Conversation

@zebulon-86

@zebulon-86 zebulon-86 commented Jun 10, 2026

Copy link
Copy Markdown

Summary

This PR updates the existing KAKUTEH7 target config to enable support for LSM6DSV16X and LSM6DSK320X.

This is a config-only change for an existing target. No new target is introduced, and no driver implementation changes are included.

Hardware Context

The existing KAKUTEH7 target supports the ICM42688P. This PR adds LSM6DSV16X and LSM6DSK320X support using the existing SPI4, chip select, INT1 data-ready interrupt, and sensor alignment configuration.

The schematic and PCB review confirms that the existing IMU interface and target pin configuration remain unchanged.

Validation

  • Built KAKUTEH7 firmware successfully.
  • Verified in Betaflight Configurator that the flashed target is identified as HBRO/KAKUTEH7.
  • Verified hardware detection for LSM6DSV16X:
    • GYRO: (1) LSM6DSV16X enabled locked dma
    • ACC: LSM6DSV16X
  • Verified hardware detection for LSM6DSK320X:
    • GYRO: (1) LSM6DSK320X enabled locked dma
    • ACC: LSM6DSK320X
      Attached Configurator and CLI status screenshots:

HBRO/KAKUTEH7 target identification
HBRO/KAKUTEH7 target identification

LSM6DSV16X CLI status
LSM6DSV16X CLI status

LSM6DSK320X CLI status
LSM6DSK320X CLI status

  • Verified the existing target alignment works correctly on hardware.
  • Blackbox data from an LSM6DSK320X manual flight of about 116 seconds shows no failsafe events and normal recovery during aggressive maneuvers.
Blackbox maneuver recovery

Checklist

  • passed Betaflight team's schematics review
  • passed hardware samples testing
  • follows applicable target and hardware guidelines
  • N/A: follows connector standards (no connector changes)
  • flight tested (LSM6DSK320X)
  • comments/issues resolved

Summary by CodeRabbit

  • Chores
    • Added support for the LSM6DSK320X combined accelerometer/gyroscope, expanding hardware compatibility for supported flight controllers.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Added a single #define USE_ACCGYRO_LSM6DSK320X macro to configs/KAKUTEH7/config.h to enable the LSM6DSK320X combined accelerometer/gyro driver at build time.

Changes

Sensor driver enablement

Layer / File(s) Summary
Sensor selection macro
configs/KAKUTEH7/config.h
A #define USE_ACCGYRO_LSM6DSK320X macro was added to select the LSM6DSK320X combined accelerometer/gyro sensor driver.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • betaflight/config#1081: Both PRs add the USE_ACCGYRO_LSM6DSK320X sensor-selection macro in board configs/*/config.h.
  • betaflight/config#1048: Adds the same USE_ACCGYRO_LSM6DSK320X compile-time macro in other target config files.
  • betaflight/config#1028: Adds USE_ACCGYRO_LSM6DSK320X in a different board config to enable the same sensor.

Suggested labels

Betaflight Supported

Suggested reviewers

  • sugaarK
  • haslinghuis
  • ot0tot
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is detailed and provides context, validation, and a checklist; however, it does not follow the template structure and leaves critical items unchecked (schematics review, comments resolved).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The PR title states 'KAKUTEH7: add LSM6DSK320X support' which accurately reflects the actual change in the raw summary (adding USE_ACCGYRO_LSM6DSK320X macro). However, the PR objectives indicate the broader context includes LSM6DSV16X support that was later removed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sugaarK

sugaarK commented Jun 12, 2026

Copy link
Copy Markdown
Member

we won't approve adding the LSM6DSV16X its not flyable as far as gyro platforms go. we have spent over a year working with and in parallel with sam on making this work and the consensus from our team and the STM mems team is its not suitable for use on flight controllers.
the LSM6DSK320X is good the DSV16 is not.

@sugaarK sugaarK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the DSV16 define... its not suitable for use on flight controllers

@zebulon-86

Copy link
Copy Markdown
Author

Updated.

LSM6DSV16X support has been removed from this PR. The change is now limited to LSM6DSK320X support for KAKUTEH7.

@zebulon-86 zebulon-86 requested a review from sugaarK June 15, 2026 02:31
@zebulon-86 zebulon-86 changed the title KAKUTEH7: add LSM6DSV16X and LSM6DSK320X support KAKUTEH7: add LSM6DSK320X support Jun 19, 2026
@zebulon-86

Copy link
Copy Markdown
Author

@sugaarK Updated as requested.

LSM6DSV16X support has been removed, and this PR is now limited to LSM6DSK320X support for KAKUTEH7.

Could you please take another look when you have time?

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.

4 participants