From 73170b0bb4e41b0807187e473bd6e6d55e4a0b8b Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 12 Dec 2024 10:32:55 -0900 Subject: [PATCH] review feedback --- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat | 6 ---- .../AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat | 30 ++++++++----------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat index 0c115c02c0aae..ef809c34a2615 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef-bl.dat @@ -8,8 +8,6 @@ FLASH_RESERVE_START_KB 0 # Location where the bootloader will put the firmware FLASH_BOOTLOADER_LOAD_KB 128 -env OPTIMIZE -Os - SERIAL_ORDER OTG1 UART7 USART1 USART3 PI9 IMU1_CS CS # SPI1 CS - IIM42653 @@ -35,7 +33,3 @@ PG4 nVDD_5V_PERIPH_EN OUTPUT HIGH PE3 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # red PE5 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # blue define HAL_LED_ON 0 - -# No param flash storage for bootloader -define HAL_USE_EMPTY_STORAGE 1 -define HAL_STORAGE_SIZE 16384 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat index 5d7a0fd5d193d..c5794a09d1871 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/ARK_FPV/hwdef.dat @@ -17,13 +17,8 @@ STORAGE_FLASH_PAGE 14 # to use a different RAM_MAP env USE_ALT_RAM_MAP 1 -env OPTIMIZE -Os - SERIAL_ORDER OTG1 UART7 UART5 USART1 USART2 UART4 USART6 OTG2 -define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_RCIN -define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_SLCAN - # Debug console STDOUT_SERIAL SD3 STDOUT_BAUDRATE 57600 @@ -56,14 +51,20 @@ PD5 USART2_TX USART2 define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_None # TODO: DJI HDL? # ESC telem RX only -PH13 UART4_TX UART4 +PH13 UART4_TX UART4 NODMA PH14 UART4_RX UART4 define DEFAULT_SERIAL5_PROTOCOL SerialProtocol_ESCTelemetry define DEFAULT_SERIAL5_BAUD 115 +define HAL_SERIAL_ESC_COMM_ENABLED 1 +define HAL_WITH_ESC_TELEM 1 # RC Input PC6 USART6_TX USART6 PC7 USART6_RX USART6 +define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_RCIN + +# TODO: build was failing +# define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_SLCAN # ADCs PA0 SCALED1_V3V3 ADC1 SCALE(2) @@ -82,11 +83,6 @@ define HAL_BATT_VOLT_SCALE 21 define HAL_BATT_CURR_SCALE 120 define HAL_BATT_MONITOR_DEFAULT 4 -# ESC Telem on UART4 -define HAL_SERIAL_ESC_COMM_ENABLED 1 -define HAL_WITH_ESC_TELEM 1 -define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_ESCTelemetry - # SPI1 - IIM42653 IMU PA5 SPI1_SCK SPI1 PB5 SPI1_MOSI SPI1 @@ -105,14 +101,14 @@ PD11 DRDY_ADIS16507 INPUT GPIO(93) # define ADIS_DRDY_PIN 93 # Motors, see STM32H743xx.py -PI0 TIM5_CH4 TIM5 PWM(1) GPIO(50) BIDIR +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) 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) 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) BIDIR +PI2 TIM8_CH4 TIM8 PWM(8) GPIO(57) PD12 TIM4_CH1 TIM4 PWM(9) GPIO(58) # PWM output for buzzer @@ -211,8 +207,8 @@ DMA_NOSHARE SPI* TIM5* TIM8* # Enable FAT filesystem support (needs a microSD defined via SDMMC) define HAL_OS_FATFS_IO 1 -# Bootloader embedding / bootloader flashing not available -define AP_BOOTLOADER_FLASHING_ENABLED 0 +# # Bootloader embedding / bootloader flashing not available +# define AP_BOOTLOADER_FLASHING_ENABLED 0 # Setup for OSD define OSD_ENABLED 1