Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

AEROFOXtech
Copy link
Contributor

  1. Add a new flight control board hwdef for AEROFOX_H7
  2. Create a new board ID for AEROFOX_H7 flight control board
  3. Add AEROFOX_H7 bootloader to Tools

Copy link
Collaborator

@andyp1per andyp1per left a 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
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto the bootloader

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
Copy link
Collaborator

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

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

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)
Copy link
Collaborator

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

Copy link
Collaborator

@Hwurzburg Hwurzburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hwurzburg
Copy link
Collaborator

@AEROFOXtech I really need each connector's pinout to review...also views of any solder pads/thru holes with their pin labels

Copy link
Collaborator

@Hwurzburg Hwurzburg left a 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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
automatically identify after installation。


## UART Mapping

- SERIAL0 -> USB
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- SERIAL0 -> USB
- SERIAL0 -> USB (MAVLink2)

<img src="AEROFOX-H7_pinout.png" alt="" width="800">

## UART Mapping

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove....does not exist

@Hwurzburg
Copy link
Collaborator

@AEROFOXtech is this ready for final re-review?you can request in the reviewers box upper right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants