feat(boards): Add support for the NewBeeDrone PixNova#26966
Conversation
Use the expected <vendor>_<model>_bootloader.bin filename so ROMFS handling treats the PixNova bootloader asset correctly during packaging and constrained flash builds. Made-with: Cursor
Made-with: Cursor
Align PX4_GPIO_INIT_LIST continuation lines with PX4 astyle rules (CI check_format). Made-with: Cursor
There was a problem hiding this comment.
Welcome, and great to see NewBeeDrone bringing board support upstream!
To answer your questions from the PR description:
Q1 (REV/VER and EEPROM): Since you have your own board target with HW_INFO_INIT_PREFIX "PixNova", you define your own HW_FMUM_ID values via resistor detection. No DS-019 EEPROM lookup is needed. This is the same approach ARK and ZeroOne use for their v6X derivatives. See my inline comment on board_config.h for details. Your pixhawk/Pixhawk-Standards#67 PR can be closed.
Q2 (board_id): You need a unique board ID registered in PX4-Bootloader. See PX4/PX4-Bootloader#260 for a recent example. I'd suggest reserving range 5900-5909 for NewBeeDrone. See inline comments on firmware.prototype and hw_config.h.
Q3 (IO v2 36V ADC divider): The stock px4_io-v2_default.bin works fine for your hardware. PWM output is completely decoupled from the voltage ADC. The only impact is that servo rail voltage telemetry will read wrong (capped at ~9.9V instead of 36V) because the IO firmware hardcodes a 3:1 divider assumption in registers.c:541. This is not a safety issue. I filed #26970 to properly wire up the existing VSERVO_SCALE register so boards can configure their own divider ratio. For now, shipping with the stock binary is fine.
Q4 (DS-012 sensors / rc.board_sensors): Your sensor startup looks correct. The PixNova000/PixNova001 variant pattern is the right approach for supporting multiple sensor configurations in the future.
Flight logs: Please upload 2-3 logs to https://logs.px4.io and link them here. At least one should be from an actual flight (not just a bench test).
See inline comments for specific issues to fix.
| #include <px4_platform/gpio.h> | ||
| #include <px4_platform/board_determine_hw_info.h> | ||
| #include <px4_platform/board_dma_alloc.h> | ||
| #include <px4_platform/gpio/mcp23009.hpp> |
There was a problem hiding this comment.
This header (px4_platform/gpio/mcp23009.hpp) doesn't exist in the PX4 codebase. The MCP23009 is a runtime I2C driver started from init scripts, not a compile-time dependency.
See how boards/auterion/fmu-v6x/init/rc.board_defaults does it:
mcp23009 start -b 3 -X -D 0xf0 -O 0xf0 -P 0x0f -M 0 -U 10You need to:
- Remove this
#includeand themcp23009_register_gpios()call at line 289 - Remove the
platform_gpio_mcp23009dependency fromCMakeLists.txt - Add the equivalent
mcp23009 startcommand to yourinit/rc.board_defaults
This is what's causing the CI build failure.
| nuttx_arch # sdio | ||
| nuttx_drivers # sdio | ||
| px4_layer | ||
| platform_gpio_mcp23009 |
There was a problem hiding this comment.
platform_gpio_mcp23009 doesn't exist as a CMake target. Remove this. The MCP23009 driver is built separately when CONFIG_DRIVERS_GPIO_MCP23009=y is set in your .px4board (which you already have).
| @@ -0,0 +1,13 @@ | |||
| { | |||
| "board_id": 53, | |||
There was a problem hiding this comment.
Board ID 53 is already assigned to TARGET_HW_PX4_FMU_V6X. The PixNova needs its own unique ID.
Submit a PR to PX4-Bootloader to reserve your ID in board_types.txt. See PX4/PX4-Bootloader#260 for a recent example.
Suggested range: 5900-5909 for NewBeeDrone. So:
# IDs 5900-5909 reserved for NewBeeDrone
TARGET_HW_NEWBEEDRONE_PIXNOVA 5900
| #define INTERFACE_USART 1 | ||
| #define INTERFACE_USART_CONFIG "/dev/ttyS0,1500000" | ||
| #define BOOT_DELAY_ADDRESS 0x000001a0 | ||
| #define BOARD_TYPE 53 |
There was a problem hiding this comment.
Same issue: BOARD_TYPE must match your new unique ID from PX4-Bootloader once reserved, not 53.
| CONFIG_CDCACM_PRODUCTSTR="PixNova BL V6X.x" | ||
| CONFIG_CDCACM_RXBUFSIZE=600 | ||
| CONFIG_CDCACM_TXBUFSIZE=12000 | ||
| CONFIG_CDCACM_VENDORID=0x3185 |
There was a problem hiding this comment.
VID 0x3185 is registered to Auterion AG. As we discussed, switch to the Dronecode VID 0x3643 with PID 0x0050 (assigned for PixNova).
So in both this file and nsh/defconfig:
CONFIG_CDCACM_VENDORID=0x3643
CONFIG_CDCACM_PRODUCTID=0x0050
CONFIG_CDCACM_VENDORSTR="NewBeeDrone"
| CONFIG_CDCACM_PRODUCTSTR="PixNova" | ||
| CONFIG_CDCACM_RXBUFSIZE=600 | ||
| CONFIG_CDCACM_TXBUFSIZE=12000 | ||
| CONFIG_CDCACM_VENDORID=0x3185 |
There was a problem hiding this comment.
Same here. Update to:
CONFIG_CDCACM_VENDORID=0x3643
CONFIG_CDCACM_PRODUCTID=0x0050
CONFIG_CDCACM_VENDORSTR="NewBeeDrone"
| #define GPIO_PPM_IN /* PI5 T8C1 */ GPIO_TIM8_CH1IN_2 | ||
|
|
||
| /* RC Serial port */ | ||
| #define RC_SERIAL_PORT "/dev/ttyS5" |
There was a problem hiding this comment.
RC_SERIAL_PORT and PX4IO_SERIAL_DEVICE (line 62) both point to /dev/ttyS5. The reference v6x doesn't define RC_SERIAL_PORT in board_config.h at all. Is this intentional, or a leftover from the copy?
| * POSSIBILITY OF SUCH DAMAGE. | ||
| * | ||
| ************************************************************************************/ | ||
| #ifndef __NUTTX_CONFIG_PX4_FMU_V6X_INCLUDE_BOARD_H |
There was a problem hiding this comment.
Header guard still references v6x. Should be something like __NUTTX_CONFIG_NEWBEEDRONE_PIXNOVA_INCLUDE_BOARD_H.
Also throughout this file, comments reference "PX4 FMUV6X" and "px4_fmu-v6x" where they should say PixNova. And the LED definitions comment block (around lines 317-330) is duplicated. General template cleanup pass needed.
| CONFIG_DRIVERS_POWER_MONITOR_PM_SELECTOR_AUTERION=y | ||
| CONFIG_DRIVERS_PWM_OUT=y | ||
| CONFIG_DRIVERS_PX4IO=y | ||
| CONFIG_DRIVERS_RC_INPUT=y |
There was a problem hiding this comment.
New boards should use CONFIG_DRIVERS_COMMON_RC instead of the legacy CONFIG_DRIVERS_RC_INPUT.
Also, CONFIG_DRIVERS_POWER_MONITOR_PM_SELECTOR_AUTERION on line 40 -- is this intentional for your hardware, or leftover from the v6x copy?
|
|
||
| #define BOARD_NUM_SPI_CFG_HW_VERSIONS 2 | ||
| // Base/FMUM | ||
| #define PixNovaV6X000 HW_FMUM_ID(0x0) // PixNova V6X, Sensor Set RevA |
There was a problem hiding this comment.
Answer to your Q1 (REV/VER): This is exactly the right pattern. Since you have your own board target with HW_INFO_INIT_PREFIX "PixNova", these HW_FMUM_ID values are yours to manage via resistor detection. No DS-019 EEPROM lookup needed.
See how other v6X derivatives do the same thing:
- ARK:
ARKV6X_0 HW_FMUM_ID(0x0),ARKV6X_1 HW_FMUM_ID(0x1)(2 variants) - ZeroOne:
ZeroOneX6_0throughZeroOneX6_2(3 variants, one reserved)
To add sensor variants later, define PixNovaV6X002 HW_FMUM_ID(0x2) and bump BOARD_NUM_SPI_CFG_HW_VERSIONS.
Your pixhawk/Pixhawk-Standards#67 PR can be closed.
Awesome, thanks Roman! I'll take a look and get these fixed. |
Hi Roman, I'm closing this PR for the time being. We'll likely need to make some changes to the sensors, and I'll reopen it once the new tests are good to go. |
Summary
This PR adds initial board firmware support for the NewBeeDrone PixNova.
PixNova is derived from the PX4 FMUv6X reference design, and we would like to align the implementation with the current PX4 / Pixhawk standards as closely as possible.
Questions / points where we would appreciate guidance
1. REV / VER resistor and EEPROM logic
PixNova follows the FMUv6X design direction and currently uses the DS-019 config 7 approach by default, where the actual revision/version information is read from EEPROM.
For a custom NewBeeDrone board derived from V6X:
2. board_id for PixNova
We would like to request a proper board_id for NewBeeDrone PixNova.
Could the PX4 / Pixhawk team please advise on:
3. io-v2 ADC divider update for 0–36V detection
On our io-v2 hardware, we changed the servo voltage ADC divider to 100k / 10k so the board can detect 0–36V.
We would like to confirm:
px4_io-v2_default.binused inextras?4. DS-012 Sensor Set (Rev 5) and
rc.board_sensorsPixNova uses DS-012 Sensor Set (Rev 5).
We would appreciate feedback on:
rc.board_sensorssetup for PixNova looks correct / reasonableNotes
Our intention is to upstream PixNova support cleanly and keep it compatible with PX4 conventions and Pixhawk standards.
Any feedback is very welcome. Thanks!