ardupilot/libraries/AP_HAL_ChibiOS/hwdef/SULILGH7-P1-P2/hwdef-bl.dat
2025-02-17 19:50:16 +11:00

106 lines
2.0 KiB
Plaintext

# hw definition file for processing by chibios_hwdef.py
# for the SULILGH7_P1 hardware
# MCU class and specific type
MCU STM32H7xx STM32H743xx
# crystal frequency
OSCILLATOR_HZ 16000000
# board ID for firmware load
APJ_BOARD_ID AP_HW_SULILGH7-P1-P2
# 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
MCU_CLOCKRATE_MHZ 480
# ChibiOS system timer
STM32_ST_USE_TIMER 2
# order of UARTs (and USB)
SERIAL_ORDER OTG1 UART7 USART2 USART3
# 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
PI9 ICM20689_CS CS
PH5 BMP_581_CS CS
PI4 BMI088_A_CS CS
PI8 BMI088_G_CS CS
PH15 ICM_42688_CS CS
PG7 FRAM_CS CS
PC2 EXT1_CS CS
PC3 EXT2_CS CS
# DEBUG
PE8 UART7_TX UART7
PE7 UART7_RX UART7
# telem1
PD5 USART2_TX USART2
PA3 USART2_RX USART2
PD4 USART2_RTS USART2
PD3 USART2_CTS USART2
# telem2
PD8 USART3_TX USART3
PD9 USART3_RX USART3
PD12 USART3_RTS USART3
PD11 USART3_CTS USART3
# LEDs
PE3 LED_RED OUTPUT OPENDRAIN HIGH # red
PE4 LED_ACTIVITY OUTPUT OPENDRAIN HIGH # blue
PE5 LED_BOOTLOADER OUTPUT OPENDRAIN HIGH # green
define HAL_STORAGE_SIZE 16384
# enable DFU by default
ENABLE_DFU_BOOT 1
# support flashing from SD card:
# power enable pins
PG3 VDD_3V3_SD_CARD_EN OUTPUT HIGH
PG6 VDD_3V3_IMU_EN OUTPUT HIGH
# 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
PG11 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 BOOTLOADER_DEBUG SD7
define AP_BOOTLOADER_FLASH_FROM_SD_ENABLED 1