# hw definition file for processing by chibios_hwdef.py # for H743 # MCU class and specific type MCU STM32H7xx STM32H743xx env OPTIMIZE -O2 # USB setup USB_STRING_MANUFACTURER "ArduPilot" USB_STRING_PRODUCT "%BOARD%" # crystal frequency OSCILLATOR_HZ 25000000 FLASH_SIZE_KB 2048 # setup build for a peripheral firmware env AP_PERIPH 1 # bootloader is installed at zero offset FLASH_RESERVE_START_KB 128 FLASH_BOOTLOADER_LOAD_KB 128 # reserve 256 bytes for comms between app and bootloader RAM_RESERVE_START 256 MAIN_STACK 0x2000 PROCESS_STACK 0x6000 # board ID for firmware load APJ_BOARD_ID 1315 PA13 JTMS-SWDIO SWD PA14 JTCK-SWCLK SWD ########################### # CAN setup PB8 CAN1_RX CAN1 PB9 CAN1_TX CAN1 ########################### # UART 1 - Avionics PA9 USART1_TX USART1 PA10 USART1_RX USART1 # UART 2 - Avionics PD5 USART2_TX USART2 PD6 USART2_RX USART2 # UART 3 - unused, J2 (2 pin) PC10 UART4_TX UART4 PC11 UART4_RX UART4 # UART 4 - debug console, J6 (4 pin) PE7 UART7_RX UART7 PE8 UART7_TX UART7 # Now we define the pins that USB is connected on. PA11 OTG_FS_DM OTG1 PA12 OTG_FS_DP OTG1 # order of UARTs (and USB) SERIAL_ORDER OTG1 USART1 USART2 #SERIAL_ORDER OTG1 USART1 USART2 OTG2 #SERIAL_ORDER OTG1 USART1 USART2 UART4 UART7 #SERIAL_ORDER OTG1 USART1 USART2 UART4 UART7 OTG2 define AP_CAN_SLCAN_ENABLED 0 ########################### # storage ########################### define HAL_STORAGE_SIZE 32768 STORAGE_FLASH_PAGE 14 ########################### # Ethernet PC1 ETH_MDC ETH1 PA2 ETH_MDIO ETH1 PC4 ETH_RMII_RXD0 ETH1 PC5 ETH_RMII_RXD1 ETH1 PB12 ETH_RMII_TXD0 ETH1 PB13 ETH_RMII_TXD1 ETH1 PB11 ETH_RMII_TX_EN ETH1 PA7 ETH_RMII_CRS_DV ETH1 PA1 ETH_RMII_REF_CLK ETH1 PA15 GPIO_ETH_ENABLE INPUT FLOATING GPIO(113) define HAL_GPIO_ETH_ENABLE 113 define BOARD_PHY_ID MII_LAN8742A_ID define BOARD_PHY_RMII define HAL_PERIPH_ENABLE_NETWORKING ################### #Communications and debug # use DNA define HAL_CAN_DEFAULT_NODE_ID 0 ################################# # Multi-purpose pins like SPI, I2C, GPIO, PWMs, LEDs, ADC I2C_ORDER I2C4 PD12 I2C4_SCL I2C4 PD13 I2C4_SDA I2C4 # LEDs PE11 LED1 OUTPUT LOW GPIO(3) PE12 LED2 OUTPUT LOW GPIO(4) define HAL_GPIO_PIN_LED HAL_GPIO_PIN_LED1 #define HAL_GPIO_PIN_LED_CAN1 HAL_GPIO_PIN_LED2 define HAL_LED_ON 1 define HAL_USE_ADC FALSE define STM32_ADC_USE_ADC1 FALSE define HAL_DISABLE_ADC_DRIVER TRUE ################################# # --------------------------------------------------------------------------------------------- # AP_Periph - boiler-plate configurations that all HW AP-Periph need # --------------------------------------------------------------------------------------------- #define HAL_NO_GPIO_IRQ define HAL_PERIPH_SHOW_SERIAL_MANAGER_PARAMS ################################# # AP_Periph - configurations specific to this App ################################# # listen for reboot command from uploader.py script # undefine to disable. Use -1 to allow on all ports, otherwise serial number index defined in SERIAL_ORDER starting at 0 define HAL_PERIPH_LISTEN_FOR_SERIAL_UART_REBOOT_CMD_PORT 0 ################################# DMA_NOSHARE USART1* USART2* CAN1* # bootloader embedding / bootloader flashing not available define AP_BOOTLOADER_FLASHING_ENABLED 0 define HAL_MONITOR_THREAD_ENABLED 1 AUTOBUILD_TARGETS None