-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
hwdef: Add a new hwdef param for AEROFOX H7 flight control #28533
base: master
Are you sure you want to change the base?
Conversation
AEROFOXtech
commented
Nov 5, 2024
- Add a new flight control board hwdef for AEROFOX_H7
- Create a new board ID for AEROFOX_H7 flight control board
- Add AEROFOX_H7 bootloader to Tools
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.
Some changes needed
@@ -404,6 +404,9 @@ AP_HW_CUAV-7-NANO 7000 | |||
# IDs 7100-7109 reserved for VIEWPRO | |||
AP_HW_VUAV-V7pro 7100 | |||
|
|||
# IDs 7200-7209 reserved for AEROFOX | |||
AP_HW_AEROFOX_H7 7200 |
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.
This needs to be in a separate commit
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.
Ditto the bootloader
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'll submit to modify it in the next commit
BATT_MONITOR 3 | ||
CAN_P1_DRIVER 1 | ||
|
||
SERIAL1_BAUD 115 |
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.
You should not set parameters that are already the default as it consumes flash space. Ideally put these in the hwdef
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.
Thank you for your advice
OSCILLATOR_HZ 24000000 | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID 140 |
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.
Use AP_HW_AEROFOX_H7
OSCILLATOR_HZ 24000000 | ||
|
||
# board ID for firmware load | ||
APJ_BOARD_ID 7200 |
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.
Use AP_HW_AEROFOX_H7
IMU Invensensev3 SPI:42688_2 ROTATION_PITCH_180_YAW_270 | ||
|
||
SPIDEV 16470 SPI1 DEVID1 16470_CS MODE3 1*MHZ 2*MHZ | ||
SPIDEV 42688_1 SPI1 DEVID2 42688_1_CS MODE3 2*MHZ 8*MHZ |
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.
Make these 16Mhz if you can
SPIDEV 42688_2 SPI4 DEVID3 42688_2_CS MODE3 2*MHZ 8*MHZ | ||
|
||
SPIDEV ramtron SPI2 DEVID1 FRAM_CS MODE3 8*MHZ 8*MHZ | ||
SPIDEV sdcard SPI2 DEVID2 FLASH_CS MODE0 1*MHZ 8*MHZ |
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.
Ideally you would use SDMMC here
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.
Thank you for your advice, but we don't have enough GPIO ports on our hardware to use SDMMC
|
||
# GPIO | ||
PA0 TIM2_CH1 TIM2 PWM(1) GPIO(50) | ||
PA1 TIM2_CH2 TIM2 PWM(2) GPIO(51) |
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.
Should make these bdshot, should be easy
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.
needs readme ala https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_ChibiOS/hwdef/KakuteH7-Wing/README.md with all info and images
d92f58a
to
ccb7ef8
Compare
@AEROFOXtech I really need each connector's pinout to review...also views of any solder pads/thru holes with their pin labels |
ccb7ef8
to
7c4b6e5
Compare
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.
you should add SD card I/O to bootloader code to allow firmware update from SD card
also I have several other review comments requiring changes
4x ADC input | ||
|
||
FPC connector | ||
The conneimgctor includes an SPI, an I2C, an PWM IMU heating control pin. Firmware |
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.
The conneimgctor includes an SPI, an I2C, an PWM IMU heating control pin. Firmware | |
This connector includes an SPI, an I2C, an PWM IMU heating control pin. Firmware | |
|
||
FPC connector | ||
The conneimgctor includes an SPI, an I2C, an PWM IMU heating control pin. Firmware | ||
already includes drivers for ADIS16470, ICM45686, IMU heating, RM3100. It is |
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.
already includes drivers for ADIS16470, ICM45686, IMU heating, RM3100. It is |
FPC connector | ||
The conneimgctor includes an SPI, an I2C, an PWM IMU heating control pin. Firmware | ||
already includes drivers for ADIS16470, ICM45686, IMU heating, RM3100. It is | ||
automatically identify after installation。 |
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.
automatically identify after installation。 |
|
||
## UART Mapping | ||
|
||
- SERIAL0 -> USB |
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.
- SERIAL0 -> USB | |
- SERIAL0 -> USB (MAVLink2) | |
<img src="AEROFOX-H7_pinout.png" alt="" width="800"> | ||
|
||
## UART Mapping | ||
|
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.
All UARTs, except UART1, are DMA enabled. UART corresponding to each SERIAL port, and its default protocol, are shown below: |
PD5 USART2_TX USART2 | ||
PD6 USART2_RX USART2 | ||
define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_None | ||
define DEFAULT_SERIAL4_BAUD 115200 |
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.
remove, not needed
PE1 UART8_TX UART8 | ||
PE0 UART8_RX UART8 | ||
define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_MAVLink2 | ||
define DEFAULT_SERIAL6_BAUD 115200 |
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.
remove, most telemi s 64K, the default
PD8 USART3_TX USART3 | ||
PD9 USART3_RX USART3 | ||
define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_RCIN | ||
define DEFAULT_SERIAL7_BAUD 115200 |
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.
remove, not needed for RCIN protocols
define DEFAULT_SERIAL7_BAUD 115200 | ||
|
||
# default the 2nd interface to SLCAN | ||
define HAL_OTG2_PROTOCOL SerialProtocol_SLCAN |
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 prefer that the second OTG use MAVLINK2 (the default) to avoid user confusion...using MAVLink SLCAN s better access to CAN
PA13 JTMS-SWDIO SWD | ||
PA14 JTCK-SWCLK SWD | ||
|
||
#include sdcard.inc |
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.
remove....does not exist
4913a70
to
a2b00da
Compare
@AEROFOXtech is this ready for final re-review?you can request in the reviewers box upper right |