ProfiLED LUA Script taking up 4 ports

I’m sorting out a CubePilot carrier board for the Hexsoon EDU-450.

This board has the two Flight Controller connections hard wired to AUX-1 and AUX-2 for the ProfiLED devices. This is convenient but the convention is to use AUX-5 and AUX-6 for these connections.

So SERVO9_FUNCTION is set to “132” and SERVO10_FUNCTION is set to 94.

This all works just fine.

The problem is that it seems to take up Aux-3 and Aux-4 as well - a four port block.

I think normal ProfiLED implementations have the two flight controller connections set to Aux-5 and Aux-6 - so no extra ports are lost where there are only 6 AUX ports.

I recall during discussions about BD-DSHOT that Aux ports work together in groups if 4 - but I don’t remember why. But this meant that you keep your BD-DSHOT connections together properly.

Is this a Cube or AurduPilot limitation - or are there some parameters that can free up the two ports that are taken up when only two are used?

Thanks!

This is a hardware limitation regarding timer groups and the Cube Orange and Orange+ (and boards with similar FMUs). AUX1-4 are in a single timer group (TIM1), while 5 and 6 share another (TIM4).

The following is the hwdef excerpt for the aux pins:

PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50)
PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
PE9  TIM1_CH1 TIM1 PWM(4) GPIO(53)
PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54)
PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55)

IMHO, it was a poor choice by CubePilot to connect the LEDs in that fashion.

You can get around this by using BDSHOT on IOMCU for that carrier board, which is what I did when configuring it. I have yet to fly it, since I got a little frustrated with having to re-pin and re-configure stuff when I wanted to do passhthrough ESC config, and then I started cherrypicking components off of it for another project.

1 Like