-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP_HAL_ChibiOS: Add ZeroOneX6 Flight Controller Bootloader File. #27282
Changes from 27 commits
dcacb53
5e96204
6c0c0fa
6175bde
d961abc
6b5032c
5167202
77f29f4
24e348c
5561638
51eca40
45cf212
584666c
3545a4e
6b45b55
cd4ace7
0202780
ff405ed
70aeafe
699cd75
6ea2f73
416d360
5d2a4c1
02828c7
6de6def
54dfc92
85db285
8847978
63fd5b3
bc714b1
532e6b6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
## ZeroOneX6 Flight Controller | ||
The ZeroOne X6 is a flight controller manufactured by ZeroOne, which is based on the open-source FMU v6X architecture and Pixhawk Autopilot Bus open source specifications. | ||
|
||
## Features: | ||
- Separate flight control core design. | ||
- MCU | ||
STM32H753IIK6 32-bit processor running at 480MHz | ||
2MB Flash | ||
1MB RAM | ||
- Sensors | ||
- IMU: | ||
Internal Vibration Isolation for IMUs | ||
IMU constant temperature heating(1 W heating power). | ||
With Triple Synced IMUs, BalancedGyro technology, low noise and more shock-resistant: | ||
IMU1-ICM45686(With vibration isolation) | ||
IMU2-BMI088(With vibration isolation) | ||
IMU3- ICM45686(No vibration isolation) | ||
- Baro: | ||
Two barometers:2 x ICP20100 | ||
Magnetometer: Builtin RM3100 magnetometer | ||
|
||
## Pinout | ||
![ZeroOneX6 Pinout](https://github.com/ZeroOne-Aero/ardupilot/blob/zeroOneBootLoader/libraries/AP_HAL_ChibiOS/hwdef/ZeroOneX6/ZeroOneX6Pinout.jpg "ZeroOneX6") | ||
|
||
|
||
## UART Mapping | ||
The UARTs are marked Rn and Tn in the above pinouts. The Rn pin is the receive pin for UARTn. The Tn pin is the transmit pin for UARTn. | ||
| Name | Function |DMA| | ||
| ------- | -------- |---| | ||
| SERIAL0 | OTG1 || | ||
| SERIAL1 | UART7 |DMA Enabled | | ||
| SERIAL2 | UART5 |DMA Enabled | | ||
| SERIAL3 | USART1 |DMA Enabled | | ||
| SERIAL4 | UART8 |DMA Enabled | | ||
| SERIAL5 | USART2 |DMA Enabled | | ||
| SERIAL6 | UART4 |DMA Enabled | | ||
| SERIAL7 | USART3 |DMA Enabled | | ||
| SERIAL8 | OTG2 || | ||
|
||
## RC Input | ||
The remote control signal should be connected to the SBUS RC IN port or DSM/PPM RC Port.It will support ALL unidirectional RC protocols. | ||
|
||
## PWM Output | ||
The X6 flight controller supports up to 16 PWM outputs. | ||
First first 8 outputs (labelled 1 to 8) are controlled by a dedicated STM32F103 IO controller. These 8 outputs support all PWM output formats, but not DShot. | ||
The remaining 8 outputs (labelled 9 to 16) are the "auxiliary" outputs. These are directly attached to the STM32H753 FMU controller . | ||
All 16 outputs support normal PWM output formats. All FMU outputs, except 15 and 16, also support DShot. | ||
|
||
The 8 IO PWM outputs are in 4 groups: | ||
- Outputs 1 and 2 in group1 | ||
- Outputs 3 and 4 in group2 | ||
- Outputs 5, 6, 7 and 8 in group3 | ||
|
||
The 8 FMU PWM outputs are in 4 groups: | ||
- Outputs 1, 2, 3 and 4 in group1 | ||
- Outputs 5 and 6 in group2 | ||
- Outputs 7 and 8 in group3 | ||
|
||
Channels within the same group need to use the same output rate. If any channel in a group uses DShot then all channels in the group need to use DShot. | ||
|
||
## Battery Monitoring | ||
The X6 flight controller has two six-pin power connectors, supporting CAN interface power supply. | ||
These are set by default in the firmware and shouldn't need to be adjusted. | ||
|
||
## Compass | ||
The X6 flight controller built-in industrial-grade electronic compass chip RM3100. | ||
|
||
## Analog inputs | ||
The X6 flight controller has 2 analog inputs. | ||
- ADC Pin12 -> ADC 6.6V Sense | ||
- ADC Pin13 -> ADC 3.3V Sense | ||
- RSSI input pin = 103 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
BATT_VOLT_PIN 12 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These can be done in the hwdef There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could this be kept here? |
||
BATT_CURR_PIN 13 | ||
|
||
CAN_P1_DRIVER 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should be set automatically I believe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we sure???? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest remain it, if customer uses their own analog PMU, they just need to configure BATT_MONITOR = 4, no need to further configure BATT VOLT PIN=12 and BATT CURR PIN=13, I think this would be more user-friendly. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think he was referring to the CAN line, and I am not sure it gets set just because a CAN port is configured....its used in many other autopilots with CAN in their defaults.param files |
||
CAN_P2_DRIVER 1 | ||
|
||
BATT_MONITOR 8 | ||
GPS1_TYPE 9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should not be setting the GPS type - that is up to the user There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they supply a dronecan gps with the autopilot....should remain There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We primarily consider our users, aiming to reduce the difficulty in using our products. Our PMU and GPS communicate via dronecan, they can communicate with each other without requiring additional parameter configuration, so we have set default parameters: CAN P1 DRIVER=1, GPS1_TYPE=9. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if the CAN PMU is also provided with autopilot , it should be setup also, not an analog PMU There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes , we alsp supply a dronecan PMU . |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
# hw definition file for processing by chibios_hwdef.py | ||
# for the ZeroOneX6 hardware | ||
|
||
# MCU class and specific type | ||
MCU STM32H7xx STM32H743xx | ||
|
||
# crystal frequency | ||
OSCILLATOR_HZ 16000000 | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID 5600 | ||
|
||
# bootloader is installed at zero offset | ||
FLASH_RESERVE_START_KB 0 | ||
|
||
# the location where the bootloader will put the firmware | ||
FLASH_BOOTLOADER_LOAD_KB 128 | ||
|
||
# flash size | ||
FLASH_SIZE_KB 2048 | ||
|
||
env OPTIMIZE -Os | ||
|
||
# order of UARTs (and USB) | ||
SERIAL_ORDER OTG1 UART7 UART5 USART3 | ||
|
||
# default to all pins low to avoid ESD issues | ||
DEFAULTGPIO OUTPUT LOW PULLDOWN | ||
andyp1per marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you should just remove this line There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. would this need remain to avoid ESD issues? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should not be used in the bootloader...can be used in main firmware...this prevents some peripherals from entering test modes during their power up |
||
|
||
# Pin for PWM Voltage Selection | ||
PG6 PWM_VOLT_SEL OUTPUT HIGH GPIO(3) | ||
|
||
# USB | ||
PA11 OTG_FS_DM OTG1 | ||
PA12 OTG_FS_DP OTG1 | ||
PA9 VBUS INPUT OPENDRAIN | ||
|
||
# pins for SWD debugging | ||
PA13 JTMS-SWDIO SWD | ||
PA14 JTCK-SWCLK SWD | ||
|
||
# CS pins | ||
PI9 IMU1_CS CS | ||
PH5 ICM42688_CS CS | ||
PI4 BMI088_A_CS CS | ||
PI8 BMI088_G_CS CS | ||
PH15 BMM150_CS CS | ||
PG7 FRAM_CS CS | ||
PI10 EXT1_CS CS | ||
|
||
# telem1 | ||
PE8 UART7_TX UART7 | ||
PF6 UART7_RX UART7 OUTPUT HIGH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you need OUTPUT HIGH here - what is the purpose? |
||
|
||
# telem2 | ||
PC12 UART5_TX UART5 | ||
PD2 UART5_RX UART5 OUTPUT HIGH | ||
|
||
# debug uart | ||
PD8 USART3_TX USART3 | ||
PD9 USART3_RX USART3 OUTPUT HIGH | ||
|
||
# armed indication | ||
PE6 nARMED OUTPUT HIGH | ||
|
||
# start peripheral power off | ||
PF12 nVDD_5V_HIPOWER_EN OUTPUT HIGH | ||
PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH | ||
|
||
define HAL_USE_EMPTY_STORAGE 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need these in the bootloader There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, removed. |
||
define HAL_STORAGE_SIZE 16384 | ||
|
||
Hwurzburg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# enable DFU by default | ||
ENABLE_DFU_BOOT 1 | ||
|
||
# support flashing from SD card: | ||
# power enable pins | ||
PC13 VDD_3V3_SD_CARD_EN OUTPUT HIGH | ||
|
||
# FATFS support: | ||
define CH_CFG_USE_MEMCORE 1 | ||
define CH_CFG_USE_HEAP 1 | ||
define CH_CFG_USE_SEMAPHORES 0 | ||
define CH_CFG_USE_MUTEXES 1 | ||
define CH_CFG_USE_DYNAMIC 1 | ||
define CH_CFG_USE_WAITEXIT 1 | ||
define CH_CFG_USE_REGISTRY 1 | ||
|
||
# microSD support | ||
PD6 SDMMC2_CK SDMMC2 | ||
PD7 SDMMC2_CMD SDMMC2 | ||
PB14 SDMMC2_D0 SDMMC2 | ||
PB15 SDMMC2_D1 SDMMC2 | ||
PG11 SDMMC2_D2 SDMMC2 | ||
PB4 SDMMC2_D3 SDMMC2 | ||
define FATFS_HAL_DEVICE SDCD2 | ||
|
||
DMA_PRIORITY SDMMC* USART6* ADC* UART* USART* SPI* TIM* | ||
|
||
# enable FAT filesystem support (needs a microSD defined via SDMMC) | ||
define HAL_OS_FATFS_IO 1 | ||
|
||
define AP_BOOTLOADER_FLASH_FROM_SD_ENABLED 1 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a similar table required for the IOMCU outputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have supplemented the table of IOMCU outputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Dshot is now possible with F103 IOMCU... @andyp1per ?
# enable support for dshot on iomcu
ROMFS io_firmware_dshot.bin Tools/IO_Firmware/iofirmware_dshot_highpolh.bin
define HAL_WITH_IO_MCU_DSHOT 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and the GPIO assignments for the FMU outputs are not listed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have listed it to the README file.