2022-06-21 00:23:54 -03:00
|
|
|
# hw definition file for processing by chibios_hwdef.py
|
|
|
|
# for the HolybroV6C hardware
|
|
|
|
|
|
|
|
# MCU class and specific type
|
|
|
|
MCU STM32H7xx STM32H743xx
|
|
|
|
|
|
|
|
# crystal frequency
|
|
|
|
OSCILLATOR_HZ 16000000
|
|
|
|
|
|
|
|
# USB setup
|
|
|
|
USB_VENDOR 0x3162 # ONLY FOR USE BY Holybro
|
|
|
|
USB_PRODUCT 0x0053
|
|
|
|
USB_STRING_MANUFACTURER "Holybro"
|
|
|
|
|
|
|
|
# board ID for firmware load
|
2022-06-22 23:47:47 -03:00
|
|
|
APJ_BOARD_ID 56
|
2022-06-21 00:23:54 -03:00
|
|
|
|
|
|
|
# bootloader is installed at zero offset
|
|
|
|
FLASH_RESERVE_START_KB 0
|
|
|
|
|
|
|
|
# the location where the bootloader will put the firmware
|
|
|
|
FLASH_BOOTLOADER_LOAD_KB 128
|
|
|
|
|
|
|
|
# flash size
|
|
|
|
FLASH_SIZE_KB 2048
|
|
|
|
|
|
|
|
env OPTIMIZE -Os
|
|
|
|
|
|
|
|
# order of UARTs (and USB)
|
|
|
|
SERIAL_ORDER OTG1 UART7 UART5 USART3
|
|
|
|
|
2024-06-22 23:15:26 -03:00
|
|
|
|
2022-06-21 00:23:54 -03:00
|
|
|
|
|
|
|
# USB
|
|
|
|
PA11 OTG_FS_DM OTG1
|
|
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
PA9 VBUS INPUT OPENDRAIN
|
|
|
|
|
|
|
|
# pins for SWD debugging
|
|
|
|
PA13 JTMS-SWDIO SWD
|
|
|
|
PA14 JTCK-SWCLK SWD
|
|
|
|
|
|
|
|
# CS pins
|
|
|
|
PC13 ICM42688_CS CS
|
|
|
|
PC14 BMI055_G_CS CS
|
|
|
|
PC15 BMI055_A_CS CS
|
|
|
|
PD4 FRAM_CS CS
|
|
|
|
|
|
|
|
# telem1
|
|
|
|
PE8 UART7_TX UART7
|
|
|
|
PE7 UART7_RX UART7
|
|
|
|
|
|
|
|
# telem2
|
|
|
|
PC12 UART5_TX UART5
|
|
|
|
PD2 UART5_RX UART5
|
|
|
|
|
|
|
|
# debug uart
|
|
|
|
PD8 USART3_TX USART3
|
|
|
|
PD9 USART3_RX USART3
|
|
|
|
|
2024-04-15 23:53:04 -03:00
|
|
|
# start peripheral power on
|
|
|
|
PC10 nVDD_5V_HIPOWER_EN OUTPUT LOW
|
|
|
|
PE2 nVDD_5V_PERIPH_EN OUTPUT LOW
|
2022-06-21 00:23:54 -03:00
|
|
|
|
|
|
|
# LEDs
|
|
|
|
PD10 LED_ACTIVITY OUTPUT OPENDRAIN GPIO(90) HIGH # red
|
|
|
|
PD11 LED_BOOTLOADER OUTPUT OPENDRAIN GPIO(92) HIGH # blue
|
|
|
|
define HAL_LED_ON 0
|
|
|
|
|
|
|
|
define HAL_USE_EMPTY_STORAGE 1
|
|
|
|
define HAL_STORAGE_SIZE 16384
|
2024-09-03 06:43:07 -03:00
|
|
|
|
|
|
|
# support flashing from SD card:
|
|
|
|
|
|
|
|
# FATFS support:
|
|
|
|
define CH_CFG_USE_MEMCORE 1
|
|
|
|
define CH_CFG_USE_HEAP 1
|
|
|
|
define CH_CFG_USE_SEMAPHORES 0
|
|
|
|
define CH_CFG_USE_MUTEXES 1
|
|
|
|
define CH_CFG_USE_DYNAMIC 1
|
|
|
|
define CH_CFG_USE_WAITEXIT 1
|
|
|
|
define CH_CFG_USE_REGISTRY 1
|
|
|
|
|
|
|
|
# microSD support
|
|
|
|
PD6 SDMMC2_CK SDMMC2
|
|
|
|
PD7 SDMMC2_CMD SDMMC2
|
|
|
|
PB14 SDMMC2_D0 SDMMC2
|
|
|
|
PB15 SDMMC2_D1 SDMMC2
|
|
|
|
PB3 SDMMC2_D2 SDMMC2
|
|
|
|
PB4 SDMMC2_D3 SDMMC2
|
|
|
|
define FATFS_HAL_DEVICE SDCD2
|
|
|
|
|
|
|
|
DMA_PRIORITY SDMMC* USART6* ADC* UART* USART* SPI* TIM*
|
|
|
|
|
|
|
|
# enable FAT filesystem support (needs a microSD defined via SDMMC)
|
|
|
|
define HAL_OS_FATFS_IO 1
|
|
|
|
|
|
|
|
define AP_BOOTLOADER_FLASH_FROM_SD_ENABLED 1
|