-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: hwdef: ARK_FPV board support #28603
base: master
Are you sure you want to change the base?
Conversation
From Andy
|
Just built and flashed. Looks like it is working. |
cbfd219
to
20bfdc2
Compare
PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54) BIDIR | ||
PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55) BIDIR | ||
PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56) BIDIR | ||
PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) BIDIR |
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 bidir
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.
how did you determine the correct ones to select for BIDIR? I was reading through some forum posts where you explained it, I thought as long as they didn't share DMA it was okay. I'm also surprised the group is split across two timers. I recently worked on bidir dshot in PX4 so I would love to hear the technical reasons and understand how it works in ardupilot.
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 I set any new default params for bidir dshot? Or better to let the user configure these?
MOT_PWM_TYPE
SERVO_BLH_BDMASK
SERVO_BLH_OTYPE
SERVO_DSHOT_ESC
SERVO_DSHOT_RATE
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.
Unless you know what ESC the user is going to use I would leave these alone
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.
Just tested this and it works
PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) BIDIR
PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) BIDIR
PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) BIDIR
PH10 TIM5_CH1 TIM5 PWM(4) GPIO(53) BIDIR
PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54)
PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55)
PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56)
PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57)
PD12 TIM4_CH1 TIM4 PWM(9) GPIO(58)
PA0 SCALED1_V3V3 ADC1 SCALE(2) | ||
PB1 VDD_5V_SENS ADC1 SCALE(2) | ||
# TODO: 12V monitor | ||
# PA4 SCALED2_V3V3 ADC1 SCALE(7.66) |
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.
# Motors, see STM32H743xx.py | ||
PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) | ||
PH12 TIM5_CH3 TIM5 PWM(2) GPIO(51) BIDIR | ||
PH11 TIM5_CH2 TIM5 PWM(3) GPIO(52) | ||
PH10 TIM5_CH1 TIM5 PWM(4) GPIO(53) BIDIR | ||
PI5 TIM8_CH1 TIM8 PWM(5) GPIO(54) BIDIR | ||
PI6 TIM8_CH2 TIM8 PWM(6) GPIO(55) | ||
PI7 TIM8_CH3 TIM8 PWM(7) GPIO(56) BIDIR | ||
PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) | ||
PD12 TIM4_CH1 TIM4 PWM(9) GPIO(58) |
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 8 channels are DMA capable. Is it possible to allow usage of all of them, but only have 4 at a time configured for use? How does the user figure out which channels they need to use?
# I2C2 (BMP390 baro, internal) | ||
PF1 I2C2_SCL I2C2 | ||
PF0 I2C2_SDA I2C2 | ||
|
||
# I2C4 (IIS2MDC compass, internal) | ||
PF14 I2C4_SCL I2C4 | ||
PF15 I2C4_SDA I2C4 |
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.
Both of these busses are "internal". I noticed most other boards only have 1 internal bus, is this okay to have 2 internal busses? I assume so since the I2C_INTERNAL_MASK bitmask exists, but wanted to double check.
define HAL_IMUHEAT_P_DEFAULT 50 | ||
define HAL_IMUHEAT_I_DEFAULT 0.07 | ||
# TODO: should we use this? | ||
# define HAL_IMU_TEMP_MARGIN_LOW_DEFAULT 5 |
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.
Good practice to set an IMU temp low margin? Or just pre-arm annoyance?
|
||
# SPI6 external bus | ||
# SPIDEV adis16507 SPI6 DEVID1 EXT1_CS MODE3 1*MHZ 2*MHZ | ||
# IMU ADIS1647x SPI:adis16507 ROTATION_NONE ADIS_DRDY_PIN |
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 I have this driver active by default? Along with any other IMU drivers we want to support on external SPI?
@@ -57,6 +58,7 @@ Reserved "PX4 [BL] FMU v6X.x" 53 | |||
Reserved "PX4 [BL] FMU v6C.x" 56 | |||
|
|||
Reserved "ARK [BL] FMU v6X.x" 57 | |||
Reserved "ARK [BL] FPV" 59 |
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 causes CI to fail
Adds board support for the ARK FPV.
https://arkelectron.com/product/ark-fpv-flight-controller/
Testing Checklist
From https://ardupilot.org/dev/docs/porting.html
From my own notes
Questions
Requires
IIS2MDC compass driver PR
#28602