Skip to content

Add HGLRC Specter F722 Lite target (HGLRCF722LITE) - #11763

Open
zafbangash wants to merge 1 commit into
iNavFlight:masterfrom
zafbangash:target/hglrc-specter-f722-lite
Open

Add HGLRC Specter F722 Lite target (HGLRCF722LITE)#11763
zafbangash wants to merge 1 commit into
iNavFlight:masterfrom
zafbangash:target/hglrc-specter-f722-lite

Conversation

@zafbangash

@zafbangash zafbangash commented Aug 4, 2026

Copy link
Copy Markdown

This pull request adds support for the HGLRC Specter F722 Lite (HGLRCF722LITE).

Why a new target

The Specter F722 Lite (board_name HGLRCF722MINI, manufacturer HGLR) ships an
ICM42688P gyro. The existing HGLRCF722 target compiles MPU6000/BMI270, not the
ICM42688 — so on this board iNav boots and enumerates USB but hangs before MSP
("no configuration received within 10 seconds" in the Configurator). Betaflight 4.5.1
runs fine on the same board, confirming the hardware is good.

This target is derived from MAMBAF722_2022A (same board-layout family) with the
ICM42688 driver enabled and the pin map corrected to this board's real resources,
taken from a Betaflight 4.5.1 resource / diff all factory dump. It is purely
additive
— a new src/main/target/HGLRCF722LITE/ directory, no changes to any
existing target or shared code.

Deltas vs the Mamba baseline (all from the factory dump):

Peripheral This board Mamba baseline
Gyro ICM42688P, SPI1 / CS PA4 / EXTI PC4 (only in Mamba_2022B)
Beeper PC13 PB2
OSD MAX7456 CS PB2 PB12
Flash M25P16 SPI2 / PB12 (SPI3 removed) SPI3
ADC VBAT/CURR/RSSI PC2 / PC1 / PC0 PC1 / PC3
PINIO 1/2 PC3 / PA15 PC0 / PC2
Unchanged and already matching: all 6 UARTs, I2C1 (PB8/PB9), SPI1/SPI2, motor/timer
map, LED strip PB3.

Provenance

I'm a community member (not affiliated with HGLRC), and the board is already supported
in Betaflight
. The pin map is taken directly from a Betaflight 4.5.1 factory resource /
diff all dump on real hardware; the full dumps are available on request to cross-check.
Whether this meets docs/policies/NEW_HARDWARE_POLICY.md for official inclusion is the
maintainers' call. The target and a prebuilt hex are also published for local flashing at
https://github.com/zafbangash/inav-hglrc-specter-f722-lite.

Verified on hardware by the submitter (iNav 9.0.1)

  • Flash firmware
  • Boots to Configurator / MSP responds
  • Gyro working (ICM42688P)
  • Accel working
  • Orientation matches (CW0_DEG, verified against Betaflight)
  • OSD working (MAX7456)
  • Onboard ELRS RX — UART2 / CRSF
  • GPS — UART4
  • Motor outputs
  • Blackbox to onboard SPI flash
  • Voltage — VBAT_SCALE default (1100), not yet calibrated against a reference
  • Current — default scale, not yet calibrated
  • Servo outputs — not yet bench-tested
  • Buzzer, LEDs, PINIO1/2 — wired in target, not individually bench-confirmed

Items left unchecked are simply not yet independently verified — happy to test
specific ones on request, or defer to a core developer's verification on a sample.

The HGLRC Specter F722 Lite (board_name HGLRCF722MINI, mfr HGLR) ships an
ICM42688P gyro, which the existing HGLRCF722 target does not build — that
target compiles MPU6000/BMI270, so iNav boots and enumerates USB but hangs
before MSP. Betaflight runs fine, confirming the hardware is good.

This target is derived from MAMBAF722_2022A (same board layout family) with
the ICM42688 driver enabled and the pin map corrected to this board's real
resources, taken from a Betaflight 4.5.1 `resource`/`diff all` factory dump.
Deltas vs the Mamba baseline: gyro ICM42688P, beeper PC13, OSD-CS PB2, flash
on SPI2/PB12 (SPI3 removed), ADC PC2/PC1/PC0, PINIO PC3/PA15, onboard ELRS
RX on UART2 (CRSF).

Built and confirmed booting to MSP on hardware (iNav 9.0.1).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Aug 4, 2026

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Branch Targeting Suggestion

You've targeted the master branch with this PR. Please consider if a version branch might be more appropriate:

  • maintenance-9.x - If your change is backward-compatible and won't create compatibility issues between INAV firmware and Configurator 9.x versions. This will allow your PR to be included in the next 9.x release.

  • maintenance-10.x - If your change introduces compatibility requirements between firmware and configurator that would break 9.x compatibility. This is for PRs which will be included in INAV 10.x

If master is the correct target for this change, no action is needed.


This is an automated suggestion to help route contributions to the appropriate branch.

@qodo-code-review

qodo-code-review Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Add HGLRC Specter F722 Lite (HGLRCF722LITE) flight controller target

✨ Enhancement ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Add a new STM32F722 target for HGLRC Specter F722 Lite (HGLRCF722MINI).
• Enable ICM42688P/ICM42605-class IMU over SPI1 with correct orientation and EXTI.
• Define board-specific pin/resource map (OSD, SPI flash, ADC, PINIO, UART2 CRSF).
Diagram

graph TD
  A["Build system"] --> B["HGLRCF722LITE target"] --> C["IMU (ICM42688P)"]
  B --> D["OSD (MAX7456)"] --> E["SPI2 bus"] --> F["Flash (M25P16)"]
  B --> G["UART2 (CRSF RX)"]
  B --> H["Timers/PWM map"]
  subgraph Legend
    direction LR
    _cfg["Config/Target files"] ~~~ _hw["On-board peripheral"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Extend existing HGLRCF722 target with selectable IMU/pin map
  • ➕ Avoids a new firmware artifact/target name for a similar board family
  • ➕ Could consolidate documentation and reduce duplicated target definitions
  • ➖ Requires conditional pin maps and sensor selection, increasing complexity and risk of misconfiguration
  • ➖ Harder for users to pick the correct firmware; may require build-time options not exposed in releases
2. Auto-detect IMU and keep a single target
  • ➕ Potentially one target could cover multiple hardware revisions automatically
  • ➕ Reduces user-facing target proliferation if detection is robust
  • ➖ IMU auto-detection and multi-pin-map support adds boot-time branching and maintenance cost
  • ➖ Does not solve mismatched peripheral wiring (OSD/flash/ADC/PINIO) without additional detection logic

Recommendation: Keep the PR’s additive new-target approach. This board differs not only by IMU but also by multiple resource assignments (OSD CS, flash bus/CS, ADC channels, PINIO, RX default), making a separate target the clearest and lowest-risk way to ensure correct defaults and avoid regressions in the existing HGLRCF722 build.

Files changed (4) +280 / -0

Enhancement (3) +279 / -0
config.cSet target defaults for PINIO boxes and UART2 CRSF RX +57/-0

Set target defaults for PINIO boxes and UART2 CRSF RX

• Defines targetConfiguration() to assign BOX USER1/USER2 to PINIO1/2 and defaults UART2 to FUNCTION_RX_SERIAL for the onboard ELRS receiver.

src/main/target/HGLRCF722LITE/config.c

target.cAdd timer/output mapping for motors/servos and LED strip +46/-0

Add timer/output mapping for motors/servos and LED strip

• Introduces the timerHardware[] map (matching the MAMBAF722_2022A layout family) using TIM_USE_OUTPUT_AUTO for S1-S8 and TIM_USE_LED for the WS2811 pad.

src/main/target/HGLRCF722LITE/target.c

target.hDefine Specter F722 Lite pin map and enabled peripherals +176/-0

Define Specter F722 Lite pin map and enabled peripherals

• Adds the full target definition: enables ICM42688P via ICM42605 SPI1 configuration (CS PA4, EXTI PC4, CW0_DEG), sets OSD MAX7456 on SPI2 CS PB2, configures M25P16 flash on SPI2 CS PB12, maps ADC channels for VBAT/CURRENT/RSSI, assigns beeper/LEDs, and sets UART2 CRSF as the default serial RX.

src/main/target/HGLRCF722LITE/target.h

Other (1) +1 / -0
CMakeLists.txtRegister new STM32F722 HGLRCF722LITE build target +1/-0

Register new STM32F722 HGLRCF722LITE build target

• Adds the CMake entry to produce a dedicated firmware artifact for HGLRCF722LITE.

src/main/target/HGLRCF722LITE/CMakeLists.txt

@qodo-code-review

Copy link
Copy Markdown
Contributor

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

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@sensei-hacker sensei-hacker added the New target This PR adds a new target label Aug 4, 2026
@sensei-hacker

Copy link
Copy Markdown
Member

Internal note:
To be checked: What are the differences between this target and HGLRCF722 ? Just the ICM42688P gyro, or is it a very different board?

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown

Test firmware build ready — commit 2128538

Download firmware for PR #11763

1 targets built. Find your board's .hex file by name on that page (e.g. MATEKF405SE.hex). Files are individually downloadable — no GitHub login required.

Development build for testing only. Use Full Chip Erase when flashing.

@zafbangash

Copy link
Copy Markdown
Author

It's more than just the gyro — that was the symptom (stock HGLRCF722 builds MPU6000/BMI270, so it hangs before MSP on this board), but the pin map differs in several places too. Deltas vs HGLRCF722 / the Mamba baseline it's derived from:

  • Gyro: ICM42688P — SPI1, CS PA4, EXTI PC4
  • Beeper: PC13 (vs PB2)
  • OSD MAX7456 CS: PB2 (vs PB12)
  • Flash M25P16: SPI2 / PB12 — SPI3 dropped (that shared-bus conflict was the actual boot-hang; PA15 is PINIO2 here)
  • ADC VBAT/CURR/RSSI: PC2 / PC1 / PC0
  • PINIO 1/2: PC3 / PA15
  • Default RX: UART2 CRSF (onboard ELRS)

UARTs, I2C1, SPI buses, and the motor/timer map match the Mamba family. Everything's from a Betaflight 4.5.1 resource / diff all dump off the actual board — happy to attach the raw dumps if useful. It's purely additive (no change to HGLRCF722), so it won't touch the existing build.

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

Labels

New target This PR adds a new target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants