-
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)
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 rotate the inbound DMA channel between CH1-2 and CH3-4, this is because the IC is organized in this way. I suspect that what yo uhave above will simply mean that the first channel in the IC group gets used. Removing one makes it clear which one is being used because sometimes it matters.
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 rotate the inbound DMA channel between CH1-2 and CH3-4
Are you saying that the dshot RX frame is being read round robin? I am looking at the hwdef.dat and this is how it appears since they all are configured use the same DMA stream when I group them all on a single timer. So the eRPM read rate would be 1/4th.
#define STM32_TIM_TIM5_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_TIM_TIM5_CH2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_TIM_TIM5_CH3_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
#define STM32_TIM_TIM5_CH4_DMA_STREAM STM32_DMA_STREAM_ID(2, 2)
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.
For each dshot pulse that goes out using the timer _UP channel only one is read on the return. So yes in this case the rate is 1/4 of the output rate. This is the main reason that the SERVO_DSHOT_RATE parameter exists.
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.
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?
@@ -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
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.
yeah seems like a pretty low id
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 ID is already set in PX4 and QGC. Why would the board ID make the CI fail?
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.
IDK, one for @peterbarker
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.
looks like bl/fmu don't share IDs
https://github.com/ArduPilot/ardupilot/blob/master/Tools/autotest/validate_board_list.py#L55-L66
@dakejahl readme will need images of board with connectors labeled |
@Hwurzburg I've added top/bottom images of the silkscreen which has the pin 1 indicator next to each connector |
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