Skip to content

Enable USE_LED_STRIP for Radiomaster Nexus XR (NEXUSX target) #11507

@wander72

Description

@wander72

Currently, it is impossible to configure a LED_STRIP output on the Radiomaster Nexus XR flight controller running INAV 9.0.1.

We attempted to configure the LED strip output on the PB6 (labelled "AUX") and PB7 (labelled "SBUS") pads, which share TIM4 (CH1 and CH2 respectively). We used the standard INAV CLI sequence for timer output reassignment:

serial 0 0 115200 115200 115200 115200
timer_output_mode 3 LED
feature LED_STRIP
save

Despite the commands being accepted and the feature showing as enabled in the CLI, the resource dump continued to show B06 and B07 as FREE.

After investigating the INAV 9.0.1 source code, we discovered the root cause: the NEXUSX target configuration (src/main/target/NEXUSX/target.h) does not define USE_LED_STRIP. As a result, the entire LED strip initialization code (including ws2811LedStripInit and the associated IO mappings) is excluded at compile time.

Solution we'd like:
If possible, please add the following definitions to src/main/target/NEXUSX/target.h to enable LED strip functionality:

#define USE_LED_STRIP
#define WS2811_PIN PB6

This should assign the default LED strip output to the PB6 pad (labelled "AUX"), which is connected to TIM4 CH1.

Considered alternative:
The only current workaround is to compile a custom INAV firmware binary with these definitions added manually, which is not ideal for the average user.

Additional context
The fix should be straightforward because:

  1. PB6 (TIM4 CH1) and PB7 (TIM4 CH2) are already exposed as pads on the board ("AUX" and "SBUS").

  2. TIM4 CH1 (on PB6) has a free DMA stream (DMA1 Stream 0 Channel 2), which does not conflict with the ADC DMA (DMA2 Stream 0) defined for this target.

  3. Users who do not need UART1 TX on the "AUX" pad can easily repurpose it for LEDs, but this requires the firmware to support the feature in the first place.

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions