Problem with GPIO / BRD_PWM_COUNT in Arducopter 4.0.2

Hi,

I am confused by the following on a Pixhawk 2.1 (black cube):
Documentation claims this:
https://ardupilot.org/copter/docs/parameters-Copter-stable-V4.0.2.html?highlight=brd_pwm_count#brd-pwm-count-auxiliary-pin-config

MP 1.3.70 still claims this (the old values or still true ?):

My trials:
BRD_PWM_COUNT = 0 --> no PWM on AUX1-6 (as expected)
BRD_PWM_COUNT = 1-4 --> PWM on AUX1-4, no PWM on AUX5-6 (only o.k. for = 4)
BRD_PWM_COUNT = 5-7 --> PWM on AUX1-6 (only o.k. for = 6 or = 7 if documentation is right, wrong for = 7 if MP is correct)

Is this a bug or am I missing something ?

1 Like

BRD_PWM_COUNT=0 No PWM on AUX 1-6
BRD_PWM_COUNT=1 PWM on Aux1 GPIO on 2-6
BRD_PWM_COUNT=2 PWM on Aux1&2 GPIO on 3-6
BRD_PWM_COUNT=3 PWM on Aux1,2&3 GPIO on 4-6
BRD_PWM_COUNT=4 PWM on Aux1-4 GPIO on 5&6
BRD_PWM_COUNT=5 PWM on Aux1-5 GPIO on 6
BRD_PWM_COUNT=6 PWM on Aux1-6 (all) GPIO on none
BRD_PWM_COUNT=7 Invalid for Pixhawk Cube Black.

2 Likes

Hi Dave,

your values are according to the documentation.
Did you actually try them on a Pixhawk 2.1 (black cube) using 4.0.2 and you confirm it is working
or do you just tell me what it should be ?

Any ideas why I get:
BRD_PWM_COUNT=0 No PWM on AUX 1-6 --> same as your data
BRD_PWM_COUNT=1 PWM on Aux1-4 GPIO on 5&6 --> different from your data
BRD_PWM_COUNT=2 PWM on Aux1-4 GPIO on 5&6 --> different from your data
BRD_PWM_COUNT=3 PWM on Aux1-4 GPIO on 5&6 --> different from your data
BRD_PWM_COUNT=4 PWM on Aux1-4 GPIO on 5&6 --> same as your data
BRD_PWM_COUNT=5 PWM on Aux1-6 (all) GPIO on none --> different from your data
BRD_PWM_COUNT=6 PWM on Aux1-6 (all) GPIO on none --> same as your data

Thank You for your reply

Hi Markus,
Actually no with a Cube but I have configured most of these on a standard Pixhawk and it seemed to be as per the documentation. What you are saying is 0, 4 or 6 are the only properly recognized values. Can you post your parameter file, maybe there is something to see.

Edit: I don’t have a Cube Black to test this on but on a standard Pixhawk using the Output Banner Message in 4.0.4-dev the PWM outputs available match the brd_count configuration. This is a low level message so it should be right. There could still be an issue with the Cube Black I suppose.

Hi Dave,

here is the parameter file:

Hexa_v4.0.2_Pixhawk_2.1_black_cube.param (17.9 KB)

Hi Markus-So I played around with this on a PIxhawk. It’s not a Cube Black but I think the FMU outputs are the same. If I set the BRD_PWM_COUNT to 5, which should allow GPIO on AUX 6, I can set a relay output on that channel and it functions. I then tried BRD_PWM_COUNT 3 and configured Aux 4 for relay and it functioned also. What are you trying to do with GPIO?

1 Like

Hi Dave,

thank you for your efforts ! I am using the GPIO for camera feedback (hot shoe / CAM_FEEDBACK_PIN).
I used quite a lot of Pixhawk v1 units without any problems (most of them on planes and helicopters).

update to 4.0.3 solved it

1 Like