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

add DroneerF405 hwdef #28846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add DroneerF405 hwdef #28846

wants to merge 1 commit into from

Conversation

DroneerUAV
Copy link

@DroneerUAV DroneerUAV commented Dec 12, 2024

Add DroneerF405 board from Droneer UAV

@andyp1per
Copy link
Collaborator

andyp1per commented Dec 12, 2024

I recommend these changes:

diff --git a/libraries/AP_HAL_ChibiOS/hwdef/DroneerF405/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/DroneerF405/hwdef.dat
index 4063f183a1..96d622b26a 100644
--- a/libraries/AP_HAL_ChibiOS/hwdef/DroneerF405/hwdef.dat
+++ b/libraries/AP_HAL_ChibiOS/hwdef/DroneerF405/hwdef.dat
@@ -34,14 +34,14 @@ PA12 OTG_FS_DP OTG1
 PC5 VBUS INPUT OPENDRAIN

 # USART1(VTX)
-PA9  USART1_TX USART1
-PA10 USART1_RX USART1
+PA9  USART1_TX USART1 NODMA
+PA10 USART1_RX USART1 NODMA
 define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_Tramp

 # USART2, RC input
 PA2 USART2_TX USART2
-PA3 USART2_RX USART2 NODMA
-define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_MAVLink2
+PA3 USART2_RX USART2
+define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_RCIN

 # default to timer for RC input
 #PA3 TIM9_CH2 TIM9 RCININT PULLDOWN LOW
@@ -70,10 +70,10 @@ define DEFAULT_SERIAL5_PROTOCOL SerialProtocol_None

 # PWM output. 1 - 8 on ESC header
 # --------------------- PWM -----------------------
-PC6  TIM8_CH1   TIM8  PWM(1)  GPIO(50)
+PC6  TIM8_CH1   TIM8  PWM(1)  GPIO(50) BIDIR
 PC7  TIM8_CH2   TIM8  PWM(2)  GPIO(51)
 PC8  TIM8_CH3   TIM8  PWM(3)  GPIO(52)
-PC9  TIM8_CH4   TIM8  PWM(4)  GPIO(53)
+PC9  TIM8_CH4   TIM8  PWM(4)  GPIO(53) BIDIR
 PA15 TIM2_CH1   TIM2  PWM(5)  GPIO(54)
 PA8  TIM1_CH1   TIM1  PWM(6)  GPIO(55)
 PB10 TIM2_CH3   TIM2  PWM(7)  GPIO(56)
@@ -174,7 +174,7 @@ define HAL_OSD_TYPE_DEFAULT 1
 # Font for the osd
 ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin

-DMA_PRIORITY TIM2* TIM3*
+DMA_PRIORITY TIM8* TIM3*

 # minimal drivers to reduce flash usage
 include ../include/minimize_fpv_osd.inc

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.

Needs a README.md
Suggest the changes I outlined

OSCILLATOR_HZ 8000000

# board ID for firmware load
APJ_BOARD_ID 1054
Copy link
Collaborator

Choose a reason for hiding this comment

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

This ID is used. Please reserve an unused id

Copy link
Contributor

Choose a reason for hiding this comment

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

@DroneerUAV to be clear, you need to make an entry in Tools/AP_Bootloader/board_types.txt, reserving an ID for your board. You then you use either that numeric ID in here, or the board name you've used in board_types.txt

HAL_CHIBIOS_ARCH_F405 1

# board ID for firmware load
APJ_BOARD_ID 1054
Copy link
Collaborator

Choose a reason for hiding this comment

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

This id is used - need another one

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

Successfully merging this pull request may close these issues.

4 participants