Added configs for supporting LSM6DS320x on ORBITF435 - #11818
Added configs for supporting LSM6DS320x on ORBITF435#11818orbittechnologyx wants to merge 1 commit into
Conversation
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoORBITF435: add LSM6DS320x (LSM6DXX) IMU target configs as ICM42688P fallback
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Slow gyro autodetect boot
|
| #define USE_IMU_LSM6DXX | ||
| #define IMU_LSM6DXX_ALIGN CW270_DEG | ||
| #define LSM6DXX_SPI_BUS BUS_SPI1 | ||
| #define LSM6DXX_CS_PIN PA4 |
There was a problem hiding this comment.
1. Slow gyro autodetect boot 🐞 Bug ➹ Performance
On ORBITF435 builds with both ICM42605 and LSM6DXX enabled, gyro init always starts from GYRO_AUTODETECT and will attempt ICM42605 detection first; on LSM6DXX hardware this adds ~0.9s of delay before it can fall through to LSM6DXX detection. This slows boot and can make startup timing less reliable on the new LSM6DSK320X-equipped boards.
Agent Prompt
## Issue description
On ORBITF435, this PR enables `USE_IMU_LSM6DXX` while keeping `USE_IMU_ICM42605` enabled. Gyro init always runs `GYRO_AUTODETECT` and probes ICM first; when the physical IMU is LSM6DSK320X, the ICM driver’s detect routine performs multiple delayed retries before failing, adding a noticeable boot delay.
## Issue Context
- `gyroInit()` always calls `gyroDetect(..., GYRO_AUTODETECT)` (not target-configurable today), so every enabled gyro driver in the detection chain may be probed.
- The ICM42605 detect path includes repeated `delay(150)` retries.
## Fix Focus Areas
Pick one approach (preferably aligned with how ORBITF435 hardware is actually shipping):
1) **If ORBITF435 is now LSM6DSK320X-only**
- Remove ICM42605/42688 enablement and its busdev registration from the ORBITF435 target so autodetect doesn’t spend time probing an IMU that will never be present.
2) **If ORBITF435 must support both IMUs in one firmware**
- Consider introducing a target-specific way to bias detection order / reduce worst-case probe latency when multiple IMUs share a footprint (e.g., a faster “non-matching device” exit path in the ICM detect routine, without breaking cold-start ICM detection).
### Code references
- src/main/target/ORBITF435/target.h[84-102]
- src/main/sensors/gyro.c[151-234]
- src/main/sensors/gyro.c[321-346]
- src/main/drivers/accgyro/accgyro_icm42605.c[288-318]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
|
Test firmware build ready — commit Download firmware for PR #11818 2 targets built. Find your board's
|
|
RAM / Flash usage vs. base branch — commit None of the representative targets (MATEKF405, MATEKF722, MATEKF765, MATEKH743) were built by this PR — no size comparison to show. See RAM/flash optimization guide for techniques to reduce usage. |
The LSM6DSK320x will be used in the new ORBITF435 flight controllers due to a shortage of the ICM42688P.