Add NEXUS target for RadioMaster Nexus (Original) flight controller#11324
Add NEXUS target for RadioMaster Nexus (Original) flight controller#11324joshperry wants to merge 3 commits intoiNavFlight:maintenance-9.xfrom
Conversation
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
Review Summary by QodoAdd NEXUS target for RadioMaster Nexus flight controller
WalkthroughsDescription• Add NEXUS target for RadioMaster Nexus (Original) flight controller - STM32F722-based target with ICM-42688-P IMU on SPI1 - SPL06 barometer on I2C1, W25N01G 128MB blackbox flash on SPI2 - 5 servo/motor outputs (S1-S4 + M1) with expandable configuration - UART4 with TX/RX swap for CRSF receiver on Port A • Add USE_UART4_SWAP support in serial_uart_hal.c for UART4 pin swapping • Add Nix flake development environment for cross-compilation • Disable cmake auto-download of ARM toolchain on version mismatch Diagramflowchart LR
A["NEXUS Target<br/>STM32F722"] --> B["Hardware Config<br/>target.h"]
A --> C["Timer/PWM<br/>target.c"]
A --> D["Config Defaults<br/>config.c"]
B --> E["ICM-42688-P IMU<br/>SPI1 CW90"]
B --> F["SPL06 Baro<br/>I2C1"]
B --> G["W25N01G Flash<br/>SPI2"]
B --> H["UART4 Swap<br/>CRSF RX"]
C --> I["5 PWM Outputs<br/>TIM2/3/4/5/9"]
D --> J["Motor Mode<br/>Override TIM4"]
K["serial_uart_hal.c"] --> H
L["cmake checks"] --> M["Skip Toolchain<br/>Auto-download"]
N["flake.nix"] --> O["Dev Environment<br/>ARM Toolchain"]
File Changes1. src/main/target/NEXUS/target.h
|
Code Review by Qodo
1. Toolchain mismatch not handled
|
STM32F722-based target for the original (discontinued) Nexus, distinct from the Nexus-X/XR (NEXUSX target). Pin mapping derived from Rotorflight NEXUS_F7 dump and verified on hardware. Key hardware support: - ICM-42688-P IMU on SPI1 (CW90 alignment, EXTI PA15) - SPL06 barometer on I2C1 (PB8/PB9, separate from external I2C2) - W25N01G 128MB blackbox flash on SPI2 - 5 servo/motor outputs (S1-S4 + M1), expandable to 7 - UART4 with TX/RX swap for CRSF receiver on Port A - UART1 on PA9/PA10 (not PB6/PB7 as on Nexus-X/XR) Also adds USE_UART4_SWAP support in serial_uart_hal.c for the STM32 HAL advanced UART pin swap feature.
|
Addressed the qodo issues except for 3 because UART3 TX=PB11/RX=PB10 is correct per the Rotorflight dump, the OG Nexus has these swapped vs the default STM32 pinout. The INAV HAL configures based on the UART3_TX_PIN/UART3_RX_PIN defines directly, so no swap macro is needed. |
|
Completed. Note that DSM support is not available in F722 targets due to flash limitations. |
|
DSHOT works on all motor outputs. |
Address hardware testing feedback from daijoubu: - VBAT_SCALE_DEFAULT 1100 → 320 (hardware-verified) - Port C connector pinout: pin 3 is SDA/TX (PB11), pin 4 is SCL/RX (PB10) - Clarify OG Nexus has no EXT-V input (Vin ADC only, unlike X/XR) - Update verification checklist with confirmed test results Co-Authored-By: Joshua Perry <josh@6bit.com>
|
Thanks for the review @daijoubu, I've addressed your comments. Are you sure about the orientation? I can't check now as I'm out of town, but I shucked a nexus and I'm trying to set it up with this code for flying my kunai warmliner and the part I had the most difficulty with was figuring out the orientation. It's possible my understanding of the inav orientation helper tab is the issue rather than the orientation being wrong... |
There is no orientation marker on the case, so based on the text being readable when pointed forward, the orientation is correct. It's a bit awkward as the servo header is installed towards the front of the craft, but that's not bad for most fixed wing aircraft as the flight controller goes behind the battery compartment. It would be a problem for a heli if this was mounted on the perch behind the main rotor. If the arrow pointing to the boot button is also supposed to indicate the direction of travel, then the orientation would be incorrect. |
|
Yes, it's the arrow by the boot button. Specifically because of the necessary orientation for helis like you said. I hadn't noticed it when I started the target.
I'll be home this weekend and I can play with it.
…On February 24, 2026 6:05:21 PM CST, daijoubu ***@***.***> wrote:
daijoubu left a comment (iNavFlight/inav#11324)
> Thanks for the review @daijoubu, I've addressed your comments.
>
> Are you sure about the orientation? I can't check now as I'm out of town, but I shucked a nexus and I'm trying to set it up with this code for flying my kunai warmliner and the part I had the most difficulty with was figuring out the orientation. It's possible my understanding of the inav orientation helper tab is the issue rather than the orientation being wrong...
There is no orientation marker on the case, so based on the text being readable when pointed forward, the orientation is correct. It's a bit awkward as the servo header is installed towards the front of the craft, but that's not bad for most fixed wing aircraft as the flight controller goes behind the battery compartment. It would be a problem for a heli if this was mounted on the perch behind the main rotor. If the arrow pointing to the boot button is also supposed to indicate the direction of travel, then the orientation would be incorrect.
--
Reply to this email directly or view it on GitHub:
#11324 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
The CW90 value was taken directly from the Rotorflight NEXUS_F7 target, but Rotorflight does not enforce arrow-forward as the board reference orientation. The Rotorflight CW90 was calibrated to an arbitrary mounting, not the case arrow. iNAV convention is arrow = forward, which requires CW180 on this hardware. Same root cause as the NEXUSX fix in iNavFlight#11338 / iNavFlight#11325. Co-Authored-By: Joshua Perry <josh@6bit.com>
|
OK, so after looking at things it looks like the config is 90deg off, so I changed it to CW180 instead of CW90 to align with the arrow. Apparently the same issue happened with the NEXUSX target: #11338. The root cause of this seems to be that rotorflight's instructions for figuring out alignment are basically "move it around until it matches the 3D model in the configurator" because mounting orientation in helis is much more varied than the quadcopters whose flight controllers were the first used before custom hardware came to market. |
STM32F722-based target for the original (discontinued) Nexus, distinct from the Nexus-X/XR (NEXUSX target). Pin mapping derived from Rotorflight NEXUS_F7 dump and verified on hardware.
Key hardware support:
Also includes: