diff --git a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee4/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee4/hwdef.dat index bfc0918b83..5b74c56d09 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee4/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee4/hwdef.dat @@ -1,194 +1,194 @@ -# hwdef for Luminousbees flight board - -# MCU class and specific type -MCU STM32F4xx STM32F427xx - -# board ID for firmware load -APJ_BOARD_ID 11 - -# crystal frequency -OSCILLATOR_HZ 24000000 - -# ChibiOS system timer -STM32_ST_USE_TIMER 5 - -# flash size -FLASH_SIZE_KB 2048 - -env OPTIMIZE -O3 - -# serial port for stdout disabled, use USB console -# STDOUT_SERIAL SD7 -# STDOUT_BAUDRATE 57600 - -# only one I2C bus -I2C_ORDER I2C1 - -# to match px4 we make the first bus number 1 -define HAL_I2C_BUS_BASE 1 -define HAL_I2C_INTERNAL_MASK 0 - -# order of UARTs (and USB) +# hwdef for Luminousbees flight board + +# MCU class and specific type +MCU STM32F4xx STM32F427xx + +# board ID for firmware load +APJ_BOARD_ID 11 + +# crystal frequency +OSCILLATOR_HZ 24000000 + +# ChibiOS system timer +STM32_ST_USE_TIMER 5 + +# flash size +FLASH_SIZE_KB 2048 + +env OPTIMIZE -O3 + +# serial port for stdout disabled, use USB console +# STDOUT_SERIAL SD7 +# STDOUT_BAUDRATE 57600 + +# only one I2C bus +I2C_ORDER I2C1 + +# to match px4 we make the first bus number 1 +define HAL_I2C_BUS_BASE 1 +define HAL_I2C_INTERNAL_MASK 0 + +# order of UARTs (and USB) SERIAL_ORDER OTG1 USART2 USART3 UART4 UART8 USART1 UART7 - -# UART4 is GPS -PA0 UART4_TX UART4 -PA1 UART4_RX UART4 - -# Battery & current control -PA2 BATT_VOLTAGE_SENS ADC1 -PA3 BATT_CURRENT_SENS ADC1 -PA4 VDD_5V_SENS ADC1 SCALE(2) - -# SPI1 is sensors bus -PA5 SPI1_SCK SPI1 -PA6 SPI1_MISO SPI1 -PA7 SPI1_MOSI SPI1 - - -PA11 OTG_FS_DM OTG1 -PA12 OTG_FS_DP OTG1 - -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - - -PB2 BOOT1 INPUT -PB5 VDD_BRICK_VALID INPUT - -# USART1 -PB6 TIM4_CH1 TIM4 PWM(7) GPIO(56) # PB6 as led strip control -#PB6 USART1_TX USART1 -PB7 USART1_RX USART1 - -# UWB DW1000 -PB4 UWB_CS CS - -PB8 I2C1_SCL I2C1 -PB9 I2C1_SDA I2C1 - -# SPI2 is FRAM -PB10 SPI2_SCK SPI2 -PB14 SPI2_MISO SPI2 -PB15 SPI2_MOSI SPI2 - -PC0 VBUS_VALID INPUT -PC4 SAFETY_IN INPUT PULLDOWN - -PC7 TIM8_CH2 TIM8 RCIN PULLDOWN LOW # also USART6_RX for serial RC - -PC8 SDIO_D0 SDIO -PC9 SDIO_D1 SDIO -PC10 SDIO_D2 SDIO -PC11 SDIO_D3 SDIO -PC12 SDIO_CK SDIO -PD2 SDIO_CMD SDIO - -# USART2 serial2 telem1 connected to ESP - -PD4 BMI088_ACCEL_CS CS -PD3 BMI088_GYRO_CS CS -PD5 USART2_TX USART2 -PD6 USART2_RX USART2 - -PD7 BARO_CS CS -# PB7 BARO2_CS CS # FOR DPS310 ON FRAME MICRO - -# USART3 serial3 telem2 -PD8 USART3_TX USART3 -PD9 USART3_RX USART3 -PD10 FRAM_CS CS - - -PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54) -PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55) - -# UART8 -PE0 UART8_RX UART8 -PE1 UART8_TX UART8 - -#set up SPI bus4 for UWB -PE2 SPI4_SCK SPI4 -PE5 SPI4_MISO SPI4 -PE6 SPI4_MOSI SPI4 - - -# UART7 is debug -PE7 UART7_RX UART7 NODMA -PE8 UART7_TX UART7 NODMA - -PE11 TIM1_CH2 TIM1 PWM(1) GPIO(50) #52 -PE14 TIM1_CH4 TIM1 PWM(2) GPIO(51) #50 -PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52) #53 -PE13 TIM1_CH3 TIM1 PWM(4) GPIO(53) #51 - - -# SPI device table. The DEVID values are chosen to match the PX4 port -# of ArduPilot so users don't need to re-do their accel and compass calibrations -# when moving to ChibiOS - SPIDEV ms5611_int SPI2 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ -SPIDEV bmi088_g SPI4 DEVID1 BMI088_GYRO_CS MODE3 10*MHZ 10*MHZ -SPIDEV bmi088_a SPI4 DEVID2 BMI088_ACCEL_CS MODE3 10*MHZ 10*MHZ -SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ -SPIDEV dwm1000 SPI4 DEVID5 UWB_CS MODE0 3*MHZ 20*MHZ -define HAL_CHIBIOS_ARCH_FMUV4 1 - -define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" -define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" - -define HAL_STORAGE_SIZE 16384 - -# enable RAMTROM parameter storage -define HAL_WITH_RAMTRON 1 - -# enable FAT filesystem -define HAL_OS_FATFS_IO 1 - -# pixracer has 3 LEDs, Red, Green, Blue -define HAL_HAVE_PIXRACER_LED - -define HAL_GPIO_LED_ON 0 -define HAL_GPIO_LED_OFF 1 - -# LED setup for PixracerLED driver -PB11 LED_RED OUTPUT GPIO(0) -PB1 LED_GREEN OUTPUT GPIO(1) -PB3 LED_BLUE OUTPUT GPIO(2) - -define HAL_GPIO_A_LED_PIN 0 -define HAL_GPIO_B_LED_PIN 1 -define HAL_GPIO_C_LED_PIN 2 - -# enable RTSCTS -define AP_FEATURE_RTSCTS 1 - -# battery setup -define HAL_BATT_VOLT_PIN 2 -define HAL_BATT_CURR_PIN 3 -define HAL_BATT_VOLT_SCALE 10.1 -define HAL_BATT_CURR_SCALE 17.0 - -# setup serial port defaults for ESP8266 -define HAL_SERIAL5_PROTOCOL SerialProtocol_MAVLink2 -define HAL_SERIAL5_BAUD 921600 - -# Set one or two IMUs -#IMU Invensense SPI:icm20608 ROTATION_YAW_180 -IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_ROLL_180_YAW_90 -define HAL_DEFAULT_INS_FAST_SAMPLE 1 - -# 2 compasses. R15 has LIS3MDL instead of HMC5843 -COMPASS HMC5843 SPI:hmc5843 false ROTATION_PITCH_180 -COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE - -# also probe all types of external I2C compasses -define HAL_PROBE_EXTERNAL_I2C_COMPASSES - -# Barometer ( DPS310 under test on micro frame ) -BARO MS56XX SPI:ms5611_int -# BARO DPS310 SPI:dps310 - -# reserve plenty of memory for DMA for LED buffers -define DMA_RESERVE_SIZE 32768 - -# .env DEFAULT_PARAMETERS 'Tools/Frame_params/LuminousBee4_outdoor.param' + +# UART4 is GPS +PA0 UART4_TX UART4 +PA1 UART4_RX UART4 + +# Battery & current control +PA2 BATT_VOLTAGE_SENS ADC1 +PA3 BATT_CURRENT_SENS ADC1 +PA4 VDD_5V_SENS ADC1 SCALE(2) + +# SPI1 is sensors bus +PA5 SPI1_SCK SPI1 +PA6 SPI1_MISO SPI1 +PA7 SPI1_MOSI SPI1 + + +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 + +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + + +PB2 BOOT1 INPUT +PB5 VDD_BRICK_VALID INPUT + +# USART1 +PB6 TIM4_CH1 TIM4 PWM(7) GPIO(56) # PB6 as led strip control +#PB6 USART1_TX USART1 +PB7 USART1_RX USART1 + +# UWB DW1000 +PB4 UWB_CS CS + +PB8 I2C1_SCL I2C1 +PB9 I2C1_SDA I2C1 + +# SPI2 is FRAM +PB10 SPI2_SCK SPI2 +PB14 SPI2_MISO SPI2 +PB15 SPI2_MOSI SPI2 + +PC0 VBUS_VALID INPUT +PC4 SAFETY_IN INPUT PULLDOWN + +PC7 TIM8_CH2 TIM8 RCIN PULLDOWN LOW # also USART6_RX for serial RC + +PC8 SDIO_D0 SDIO +PC9 SDIO_D1 SDIO +PC10 SDIO_D2 SDIO +PC11 SDIO_D3 SDIO +PC12 SDIO_CK SDIO +PD2 SDIO_CMD SDIO + +# USART2 serial2 telem1 connected to ESP + +PD4 BMI088_ACCEL_CS CS +PD3 BMI088_GYRO_CS CS +PD5 USART2_TX USART2 +PD6 USART2_RX USART2 + +PD7 BARO_CS CS +# PB7 BARO2_CS CS # FOR DPS310 ON FRAME MICRO + +# USART3 serial3 telem2 +PD8 USART3_TX USART3 +PD9 USART3_RX USART3 +PD10 FRAM_CS CS + + +PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54) +PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55) + +# UART8 +PE0 UART8_RX UART8 +PE1 UART8_TX UART8 + +#set up SPI bus4 for UWB +PE2 SPI4_SCK SPI4 +PE5 SPI4_MISO SPI4 +PE6 SPI4_MOSI SPI4 + + +# UART7 is debug +PE7 UART7_RX UART7 NODMA +PE8 UART7_TX UART7 NODMA + +PE11 TIM1_CH2 TIM1 PWM(1) GPIO(50) #52 +PE14 TIM1_CH4 TIM1 PWM(2) GPIO(51) #50 +PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52) #53 +PE13 TIM1_CH3 TIM1 PWM(4) GPIO(53) #51 + + +# SPI device table. The DEVID values are chosen to match the PX4 port +# of ArduPilot so users don't need to re-do their accel and compass calibrations +# when moving to ChibiOS + SPIDEV ms5611_int SPI2 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ +SPIDEV bmi088_g SPI4 DEVID1 BMI088_GYRO_CS MODE3 10*MHZ 10*MHZ +SPIDEV bmi088_a SPI4 DEVID2 BMI088_ACCEL_CS MODE3 10*MHZ 10*MHZ +SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ +SPIDEV dwm1000 SPI4 DEVID5 UWB_CS MODE0 3*MHZ 20*MHZ +define HAL_CHIBIOS_ARCH_FMUV4 1 + +define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" +define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" + +define HAL_STORAGE_SIZE 16384 + +# enable RAMTROM parameter storage +define HAL_WITH_RAMTRON 1 + +# enable FAT filesystem +define HAL_OS_FATFS_IO 1 + +# pixracer has 3 LEDs, Red, Green, Blue +define HAL_HAVE_PIXRACER_LED + +define HAL_GPIO_LED_ON 0 +define HAL_GPIO_LED_OFF 1 + +# LED setup for PixracerLED driver +PB11 LED_RED OUTPUT GPIO(0) +PB1 LED_GREEN OUTPUT GPIO(1) +PB3 LED_BLUE OUTPUT GPIO(2) + +define HAL_GPIO_A_LED_PIN 0 +define HAL_GPIO_B_LED_PIN 1 +define HAL_GPIO_C_LED_PIN 2 + +# enable RTSCTS +define AP_FEATURE_RTSCTS 1 + +# battery setup +define HAL_BATT_VOLT_PIN 2 +define HAL_BATT_CURR_PIN 3 +define HAL_BATT_VOLT_SCALE 10.1 +define HAL_BATT_CURR_SCALE 17.0 + +# setup serial port defaults for ESP8266 +define HAL_SERIAL5_PROTOCOL SerialProtocol_MAVLink2 +define HAL_SERIAL5_BAUD 921600 + +# Set one or two IMUs +#IMU Invensense SPI:icm20608 ROTATION_YAW_180 +IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_ROLL_180_YAW_90 +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# 2 compasses. R15 has LIS3MDL instead of HMC5843 +COMPASS HMC5843 SPI:hmc5843 false ROTATION_PITCH_180 +COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE + +# also probe all types of external I2C compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + +# Barometer ( DPS310 under test on micro frame ) +BARO MS56XX SPI:ms5611_int +# BARO DPS310 SPI:dps310 + +# reserve plenty of memory for DMA for LED buffers +define DMA_RESERVE_SIZE 32768 + +# .env DEFAULT_PARAMETERS 'Tools/Frame_params/LuminousBee4_outdoor.param' diff --git a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef-bl.dat index 6c671dfd1c..aeede2355d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef-bl.dat @@ -1,51 +1,51 @@ -# LUMINOUS BEE 5.1 -# hw definition file for processing by chibios_hwdef.py - -# MCU class and specific type -MCU STM32H7xx STM32H743xx - -# board ID for firmware load -APJ_BOARD_ID 1029 - -# crystal frequency -OSCILLATOR_HZ 24000000 - -# flash size -FLASH_SIZE_KB 2048 - -# bootloader is installed at zero offset -FLASH_RESERVE_START_KB 0 - -# the location where the bootloader will put the firmware -# the H743 has 128k sectors -FLASH_BOOTLOADER_LOAD_KB 128 - -# only one I2C bus -I2C_ORDER I2C1 - -define HAL_I2C_INTERNAL_MASK 0 - -# order of UARTs (and USB) for bootloading -SERIAL_ORDER OTG1 UART7 - -# UART7 is debug -PE7 UART7_RX UART7 NODMA -PE8 UART7_TX UART7 NODMA - -# pins that USB is connected on. -PA11 OTG_FS_DM OTG1 -PA12 OTG_FS_DP OTG1 - -# These are the pins for SWD debugging with a STlinkv2 or black-magic probe. -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - -# CS lines -PB4 UWB_CS CS -PC2 BMI088_ACCEL_CS CS -PC15 BMI088_GYRO_CS CS -PD7 BARO_CS CS -PE15 MAG_CS CS - -PB11 LED_BOOTLOADER OUTPUT -define HAL_LED_ON 0 +# LUMINOUS BEE 5.1 +# hw definition file for processing by chibios_hwdef.py + +# MCU class and specific type +MCU STM32H7xx STM32H743xx + +# board ID for firmware load +APJ_BOARD_ID 1029 + +# crystal frequency +OSCILLATOR_HZ 24000000 + +# flash size +FLASH_SIZE_KB 2048 + +# bootloader is installed at zero offset +FLASH_RESERVE_START_KB 0 + +# the location where the bootloader will put the firmware +# the H743 has 128k sectors +FLASH_BOOTLOADER_LOAD_KB 128 + +# only one I2C bus +I2C_ORDER I2C1 + +define HAL_I2C_INTERNAL_MASK 0 + +# order of UARTs (and USB) for bootloading +SERIAL_ORDER OTG1 UART7 + +# UART7 is debug +PE7 UART7_RX UART7 NODMA +PE8 UART7_TX UART7 NODMA + +# pins that USB is connected on. +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 + +# These are the pins for SWD debugging with a STlinkv2 or black-magic probe. +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# CS lines +PB4 UWB_CS CS +PC2 BMI088_ACCEL_CS CS +PC15 BMI088_GYRO_CS CS +PD7 BARO_CS CS +PE15 MAG_CS CS + +PB11 LED_BOOTLOADER OUTPUT +define HAL_LED_ON 0 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef.dat index e5d5e6c370..0335b8a0ed 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/luminousbee5/hwdef.dat @@ -1,226 +1,226 @@ -# LUMINOUS BEE 5.1 -# hw definition file for processing by chibios_hwdef.py - -# MCU class and specific type -MCU STM32H7xx STM32H743xx - -# board ID for firmware load -APJ_BOARD_ID 1029 - -# crystal frequency -OSCILLATOR_HZ 24000000 - -# flash size -FLASH_SIZE_KB 2048 - -# with 2M flash we can afford to optimize for speed -env OPTIMIZE -O2 - -FLASH_RESERVE_START_KB 128 - -define HAL_STORAGE_SIZE 16384 - -# only one I2C bus -I2C_ORDER I2C1 - -define HAL_I2C_INTERNAL_MASK 0 - -# order of UARTs (and USB) -SERIAL_ORDER OTG1 USART2 USART3 UART4 UART8 USART1 UART7 - -# UART4 is GPS -PA0 UART4_TX UART4 -PA1 UART4_RX UART4 - -# Battery & current control -PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1) -PA3 BATT_CURRENT_SENS ADC1 SCALE(1) -PA4 VDD_5V_SENS ADC1 SCALE(2) - -# SPI1 is sensors bus -PA5 SPI1_SCK SPI1 -PA6 SPI1_MISO SPI1 -PA7 SPI1_MOSI SPI1 - -# This is the pin that senses USB being connected. It is an input pin -# setup as OPENDRAIN. -PA9 VBUS INPUT #OPENDRAIN - -# Now we define the pins that USB is connected on. -PA11 OTG_FS_DM OTG1 -PA12 OTG_FS_DP OTG1 - -# These are the pins for SWD debugging with a STlinkv2 or black-magic probe. -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - -# PWM output for buzzer -PA15 TIM2_CH1 TIM2 GPIO(77) ALARM - -PB2 BOOT1 INPUT -#PB5 VDD_BRICK_VALID INPUT -PB5 VDD_BRICK_VALID INPUT PULLDOWN - -# USART1 TX now as led strip control -PB6 TIM4_CH1 TIM4 PWM(7) GPIO(56) # PB6 -# PB6 USART1_TX USART1 -PB7 USART1_RX USART1 - - -# UWB DW1000 -PB4 UWB_CS CS - -PB8 I2C1_SCL I2C1 -PB9 I2C1_SDA I2C1 - -# SPI2 is FRAM -PB10 SPI2_SCK SPI2 -PB12 CAN2_RX CAN2 -PB13 CAN2_TX CAN2 # this is SPI2_SCK on beta board -PB14 SPI2_MISO SPI2 -PB15 SPI2_MOSI SPI2 - -#PC0 VBUS_VALID INPUT -PC0 VBUS_VALID INPUT PULLDOWN - -#BMI088 CS -PC2 BMI088_ACCEL_CS CS -PC15 BMI088_GYRO_CS CS - -PC3 LED_SAFETY OUTPUT -PC4 SAFETY_IN INPUT PULLDOWN -PC5 VDD_PERIPH_EN OUTPUT HIGH -PC7 TIM3_CH2 TIM3 RCININT PULLDOWN LOW # also USART6_RX for serial RC - -# Now setup the pins for the microSD card, if available. -PC8 SDMMC1_D0 SDMMC1 -PC9 SDMMC1_D1 SDMMC1 -PC10 SDMMC1_D2 SDMMC1 -PC11 SDMMC1_D3 SDMMC1 -PC12 SDMMC1_CK SDMMC1 -PD2 SDMMC1_CMD SDMMC1 - - -PC13 SBUS_INV OUTPUT - - -PD0 CAN1_RX CAN1 -PD1 CAN1_TX CAN1 - -# USART2 serial2 telem1 - - -PD5 USART2_TX USART2 -PD6 USART2_RX USART2 - -PD7 BARO_CS CS - - -# USART3 serial3 telem2 -PD8 USART3_TX USART3 -PD9 USART3_RX USART3 -PD11 USART3_CTS USART3 -PD12 USART3_RTS USART3 - -# The CS pin for FRAM (ramtron). This one is marked as using -# SPEED_VERYLOW, which matches the HAL_PX4 setup. -PD10 FRAM_CS CS SPEED_VERYLOW - - -PD15 20608_DRDY INPUT # IMU Luminous Bee -# UART8 serial4 FrSky -PE0 UART8_RX UART8 -PE1 UART8_TX UART8 - - - -#set up SPI bus4 for UWB -PE2 SPI4_SCK SPI4 -PE5 SPI4_MISO SPI4 -PE6 SPI4_MOSI SPI4 - - -PE3 VDD_SENSORS_EN OUTPUT HIGH -PE4 SPEKTRUM_PWR OUTPUT HIGH - -# UART7 is debug -PE7 UART7_RX UART7 NODMA -PE8 UART7_TX UART7 NODMA - -PE11 TIM1_CH2 TIM1 PWM(1) GPIO(50) #52 -PE14 TIM1_CH4 TIM1 PWM(2) GPIO(51) #50 -PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52) #53 -PE13 TIM1_CH3 TIM1 PWM(4) GPIO(53) #51 -PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54) -PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55) - - -PE12 MAG_DRDY INPUT -PE15 MAG_CS CS - -# SPI device table. The DEVID values are chosen to match the PX4 port -# of ArduPilot so users don't need to re-do their accel and compass calibrations -# when moving to ChibiOS -# SPIDEV ms5611_int SPI2 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ -SPIDEV dps310 SPI2 DEVID3 BARO_CS MODE3 5*MHZ 5*MHZ -#SPIDEV icm20608 SPI1 DEVID6 20608_CS MODE3 2*MHZ 8*MHZ -SPIDEV hmc5843 SPI1 DEVID5 MAG_CS MODE3 11*MHZ 11*MHZ -SPIDEV bmi088_g SPI1 DEVID1 BMI088_GYRO_CS MODE3 10*MHZ 10*MHZ -SPIDEV bmi088_a SPI1 DEVID2 BMI088_ACCEL_CS MODE3 10*MHZ 10*MHZ -SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ -SPIDEV dwm1000 SPI4 DEVID5 UWB_CS MODE0 3*MHZ 20*MHZ - -define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" -define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" - -define HAL_STORAGE_SIZE 16384 - -# enable RAMTROM parameter storage -define HAL_WITH_RAMTRON 1 - -# fallback to flash is no FRAM fitted -#define STORAGE_FLASH_PAGE 22 - -# Enable FAT filesystem support (needs a microSD defined via SDMMC). -define HAL_OS_FATFS_IO 1 - -# pixracer has 3 LEDs, Red, Green, Blue -define HAL_HAVE_PIXRACER_LED - -define HAL_GPIO_LED_ON 0 -define HAL_GPIO_LED_OFF 1 - -# LED setup for PixracerLED driver -PB11 LED_RED OUTPUT GPIO(0) -PB1 LED_GREEN OUTPUT GPIO(1) -PB3 LED_BLUE OUTPUT GPIO(2) - -define HAL_GPIO_A_LED_PIN 0 -define HAL_GPIO_B_LED_PIN 1 -define HAL_GPIO_C_LED_PIN 2 - -# battery setup -define HAL_BATT_VOLT_PIN 14 -define HAL_BATT_CURR_PIN 15 -define HAL_BATT_VOLT_SCALE 10.1 -define HAL_BATT_CURR_SCALE 17.0 - -# setup serial port defaults for ESP8266 -define HAL_SERIAL5_PROTOCOL SerialProtocol_MAVLink -define HAL_SERIAL5_BAUD 921600 - -# two IMUs -#IMU Invensense SPI:icm20608 ROTATION_YAW_180 -IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_ROLL_180_YAW_90 -define HAL_DEFAULT_INS_FAST_SAMPLE 1 - -# 2 compasses. R15 has LIS3MDL instead of HMC5843 -COMPASS HMC5843 SPI:hmc5843 false ROTATION_PITCH_180 -#COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE -#COMPASS AK8963:probe_mpu9250 0 ROTATION_ROLL_180_YAW_90 - -# also probe all types of external I2C compasses -define HAL_PROBE_EXTERNAL_I2C_COMPASSES - -# TWO barometer -BARO DPS280 SPI:dps310 +# LUMINOUS BEE 5.1 +# hw definition file for processing by chibios_hwdef.py + +# MCU class and specific type +MCU STM32H7xx STM32H743xx + +# board ID for firmware load +APJ_BOARD_ID 1029 + +# crystal frequency +OSCILLATOR_HZ 24000000 + +# flash size +FLASH_SIZE_KB 2048 + +# with 2M flash we can afford to optimize for speed +env OPTIMIZE -O2 + +FLASH_RESERVE_START_KB 128 + +define HAL_STORAGE_SIZE 16384 + +# only one I2C bus +I2C_ORDER I2C1 + +define HAL_I2C_INTERNAL_MASK 0 + +# order of UARTs (and USB) +SERIAL_ORDER OTG1 USART2 USART3 UART4 UART8 USART1 UART7 + +# UART4 is GPS +PA0 UART4_TX UART4 +PA1 UART4_RX UART4 + +# Battery & current control +PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1) +PA3 BATT_CURRENT_SENS ADC1 SCALE(1) +PA4 VDD_5V_SENS ADC1 SCALE(2) + +# SPI1 is sensors bus +PA5 SPI1_SCK SPI1 +PA6 SPI1_MISO SPI1 +PA7 SPI1_MOSI SPI1 + +# This is the pin that senses USB being connected. It is an input pin +# setup as OPENDRAIN. +PA9 VBUS INPUT #OPENDRAIN + +# Now we define the pins that USB is connected on. +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 + +# These are the pins for SWD debugging with a STlinkv2 or black-magic probe. +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# PWM output for buzzer +PA15 TIM2_CH1 TIM2 GPIO(77) ALARM + +PB2 BOOT1 INPUT +#PB5 VDD_BRICK_VALID INPUT +PB5 VDD_BRICK_VALID INPUT PULLDOWN + +# USART1 TX now as led strip control +PB6 TIM4_CH1 TIM4 PWM(7) GPIO(56) # PB6 +# PB6 USART1_TX USART1 +PB7 USART1_RX USART1 + + +# UWB DW1000 +PB4 UWB_CS CS + +PB8 I2C1_SCL I2C1 +PB9 I2C1_SDA I2C1 + +# SPI2 is FRAM +PB10 SPI2_SCK SPI2 +PB12 CAN2_RX CAN2 +PB13 CAN2_TX CAN2 # this is SPI2_SCK on beta board +PB14 SPI2_MISO SPI2 +PB15 SPI2_MOSI SPI2 + +#PC0 VBUS_VALID INPUT +PC0 VBUS_VALID INPUT PULLDOWN + +#BMI088 CS +PC2 BMI088_ACCEL_CS CS +PC15 BMI088_GYRO_CS CS + +PC3 LED_SAFETY OUTPUT +PC4 SAFETY_IN INPUT PULLDOWN +PC5 VDD_PERIPH_EN OUTPUT HIGH +PC7 TIM3_CH2 TIM3 RCININT PULLDOWN LOW # also USART6_RX for serial RC + +# Now setup the pins for the microSD card, if available. +PC8 SDMMC1_D0 SDMMC1 +PC9 SDMMC1_D1 SDMMC1 +PC10 SDMMC1_D2 SDMMC1 +PC11 SDMMC1_D3 SDMMC1 +PC12 SDMMC1_CK SDMMC1 +PD2 SDMMC1_CMD SDMMC1 + + +PC13 SBUS_INV OUTPUT + + +PD0 CAN1_RX CAN1 +PD1 CAN1_TX CAN1 + +# USART2 serial2 telem1 + + +PD5 USART2_TX USART2 +PD6 USART2_RX USART2 + +PD7 BARO_CS CS + + +# USART3 serial3 telem2 +PD8 USART3_TX USART3 +PD9 USART3_RX USART3 +PD11 USART3_CTS USART3 +PD12 USART3_RTS USART3 + +# The CS pin for FRAM (ramtron). This one is marked as using +# SPEED_VERYLOW, which matches the HAL_PX4 setup. +PD10 FRAM_CS CS SPEED_VERYLOW + + +PD15 20608_DRDY INPUT # IMU Luminous Bee +# UART8 serial4 FrSky +PE0 UART8_RX UART8 +PE1 UART8_TX UART8 + + + +#set up SPI bus4 for UWB +PE2 SPI4_SCK SPI4 +PE5 SPI4_MISO SPI4 +PE6 SPI4_MOSI SPI4 + + +PE3 VDD_SENSORS_EN OUTPUT HIGH +PE4 SPEKTRUM_PWR OUTPUT HIGH + +# UART7 is debug +PE7 UART7_RX UART7 NODMA +PE8 UART7_TX UART7 NODMA + +PE11 TIM1_CH2 TIM1 PWM(1) GPIO(50) #52 +PE14 TIM1_CH4 TIM1 PWM(2) GPIO(51) #50 +PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52) #53 +PE13 TIM1_CH3 TIM1 PWM(4) GPIO(53) #51 +PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54) +PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55) + + +PE12 MAG_DRDY INPUT +PE15 MAG_CS CS + +# SPI device table. The DEVID values are chosen to match the PX4 port +# of ArduPilot so users don't need to re-do their accel and compass calibrations +# when moving to ChibiOS +# SPIDEV ms5611_int SPI2 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ +SPIDEV dps310 SPI2 DEVID3 BARO_CS MODE3 5*MHZ 5*MHZ +#SPIDEV icm20608 SPI1 DEVID6 20608_CS MODE3 2*MHZ 8*MHZ +SPIDEV hmc5843 SPI1 DEVID5 MAG_CS MODE3 11*MHZ 11*MHZ +SPIDEV bmi088_g SPI1 DEVID1 BMI088_GYRO_CS MODE3 10*MHZ 10*MHZ +SPIDEV bmi088_a SPI1 DEVID2 BMI088_ACCEL_CS MODE3 10*MHZ 10*MHZ +SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ +SPIDEV dwm1000 SPI4 DEVID5 UWB_CS MODE0 3*MHZ 20*MHZ + +define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" +define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" + +define HAL_STORAGE_SIZE 16384 + +# enable RAMTROM parameter storage +define HAL_WITH_RAMTRON 1 + +# fallback to flash is no FRAM fitted +#define STORAGE_FLASH_PAGE 22 + +# Enable FAT filesystem support (needs a microSD defined via SDMMC). +define HAL_OS_FATFS_IO 1 + +# pixracer has 3 LEDs, Red, Green, Blue +define HAL_HAVE_PIXRACER_LED + +define HAL_GPIO_LED_ON 0 +define HAL_GPIO_LED_OFF 1 + +# LED setup for PixracerLED driver +PB11 LED_RED OUTPUT GPIO(0) +PB1 LED_GREEN OUTPUT GPIO(1) +PB3 LED_BLUE OUTPUT GPIO(2) + +define HAL_GPIO_A_LED_PIN 0 +define HAL_GPIO_B_LED_PIN 1 +define HAL_GPIO_C_LED_PIN 2 + +# battery setup +define HAL_BATT_VOLT_PIN 14 +define HAL_BATT_CURR_PIN 15 +define HAL_BATT_VOLT_SCALE 10.1 +define HAL_BATT_CURR_SCALE 17.0 + +# setup serial port defaults for ESP8266 +define HAL_SERIAL5_PROTOCOL SerialProtocol_MAVLink +define HAL_SERIAL5_BAUD 921600 + +# two IMUs +#IMU Invensense SPI:icm20608 ROTATION_YAW_180 +IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_ROLL_180_YAW_90 +define HAL_DEFAULT_INS_FAST_SAMPLE 1 + +# 2 compasses. R15 has LIS3MDL instead of HMC5843 +COMPASS HMC5843 SPI:hmc5843 false ROTATION_PITCH_180 +#COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE +#COMPASS AK8963:probe_mpu9250 0 ROTATION_ROLL_180_YAW_90 + +# also probe all types of external I2C compasses +define HAL_PROBE_EXTERNAL_I2C_COMPASSES + +# TWO barometer +BARO DPS280 SPI:dps310 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/mRo-M10095/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/mRo-M10095/hwdef.dat index 2ce32bd3fd..086cc55a62 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/mRo-M10095/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/mRo-M10095/hwdef.dat @@ -1,98 +1,98 @@ -# hw definition file for processing by chibios_pins.py - -# MCU class and specific type -MCU STM32G4xx STM32G491xx - -# use DNA -define HAL_CAN_DEFAULT_NODE_ID 0 - -define CAN_APP_NODE_NAME "io.mrobotics.mRo-M10095" - -# bootloader starts firmware at 26k + 4k (STORAGE_FLASH) -FLASH_RESERVE_START_KB 30 - -# store parameters in pages 13 and 14 -define STORAGE_FLASH_PAGE 13 -define HAL_STORAGE_SIZE 800 - -# setup build for a peripheral firmware -env AP_PERIPH 1 - -# enable watchdog -define HAL_WATCHDOG_ENABLED_DEFAULT true - -# crystal frequency -OSCILLATOR_HZ 8000000 - -# assume the 512k flash part -FLASH_SIZE_KB 512 - -# board ID for firmware load -APJ_BOARD_ID 1041 - -define HAL_CAN_POOL_SIZE 6000 - -# LEDs -PA4 LED OUTPUT HIGH - -# debugger support -PA13 JTMS-SWDIO SWD -PA14 JTCK-SWCLK SWD - -# Order of I2C buses -I2C_ORDER I2C1 - -# this board only has a single I2C bus so make it external -define HAL_I2C_INTERNAL_MASK 0 - -# Now the first I2C bus. The pin speeds are automatically setup -# correctly, but can be overridden here if needed. -PA15 I2C1_SCL I2C1 -PB7 I2C1_SDA I2C1 - -# an I2C baro (DPS310) -BARO DPS280 I2C:0:0x77 - -define HAL_PERIPH_ENABLE_BARO - -PA0 VSENSE50 ADC1 SCALE(3) -PA1 VSENSE3v3 ADC1 SCALE(2) - -define NO_DATAFLASH TRUE - -define DMA_RESERVE_SIZE 2048 - -define HAL_USE_ADC TRUE - -define STM32_ADC_USE_ADC1 TRUE - -# order of UARTs -SERIAL_ORDER USART1 - -STDOUT_SERIAL SD1 -STDOUT_BAUDRATE 57600 - -# USART1, telemetry -PA9 USART1_TX USART1 SPEED_HIGH -PA10 USART1_RX USART1 SPEED_HIGH - -# stack for fast interrupts -define PORT_INT_REQUIRED_STACK 64 - -define HAL_DISABLE_LOOP_DELAY - -PA11 CAN1_RX CAN1 -PA12 CAN1_TX CAN1 - -define HAL_NO_MONITOR_THREAD - -define HAL_MINIMIZE_FEATURES 0 - -define AP_PARAM_MAX_EMBEDDED_PARAM 512 - -# keep ROMFS uncompressed as we don't have enough RAM -# to uncompress the bootloader at runtime -env ROMFS_UNCOMPRESSED True - -# don't share any DMA channels (there are enough for everyone) -DMA_NOSHARE * +# hw definition file for processing by chibios_pins.py + +# MCU class and specific type +MCU STM32G4xx STM32G491xx + +# use DNA +define HAL_CAN_DEFAULT_NODE_ID 0 + +define CAN_APP_NODE_NAME "io.mrobotics.mRo-M10095" + +# bootloader starts firmware at 26k + 4k (STORAGE_FLASH) +FLASH_RESERVE_START_KB 30 + +# store parameters in pages 13 and 14 +define STORAGE_FLASH_PAGE 13 +define HAL_STORAGE_SIZE 800 + +# setup build for a peripheral firmware +env AP_PERIPH 1 + +# enable watchdog +define HAL_WATCHDOG_ENABLED_DEFAULT true + +# crystal frequency +OSCILLATOR_HZ 8000000 + +# assume the 512k flash part +FLASH_SIZE_KB 512 + +# board ID for firmware load +APJ_BOARD_ID 1041 + +define HAL_CAN_POOL_SIZE 6000 + +# LEDs +PA4 LED OUTPUT HIGH + +# debugger support +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +# Order of I2C buses +I2C_ORDER I2C1 + +# this board only has a single I2C bus so make it external +define HAL_I2C_INTERNAL_MASK 0 + +# Now the first I2C bus. The pin speeds are automatically setup +# correctly, but can be overridden here if needed. +PA15 I2C1_SCL I2C1 +PB7 I2C1_SDA I2C1 + +# an I2C baro (DPS310) +BARO DPS280 I2C:0:0x77 + +define HAL_PERIPH_ENABLE_BARO + +PA0 VSENSE50 ADC1 SCALE(3) +PA1 VSENSE3v3 ADC1 SCALE(2) + +define NO_DATAFLASH TRUE + +define DMA_RESERVE_SIZE 2048 + +define HAL_USE_ADC TRUE + +define STM32_ADC_USE_ADC1 TRUE + +# order of UARTs +SERIAL_ORDER USART1 + +STDOUT_SERIAL SD1 +STDOUT_BAUDRATE 57600 + +# USART1, telemetry +PA9 USART1_TX USART1 SPEED_HIGH +PA10 USART1_RX USART1 SPEED_HIGH + +# stack for fast interrupts +define PORT_INT_REQUIRED_STACK 64 + +define HAL_DISABLE_LOOP_DELAY + +PA11 CAN1_RX CAN1 +PA12 CAN1_TX CAN1 + +define HAL_NO_MONITOR_THREAD + +define HAL_MINIMIZE_FEATURES 0 + +define AP_PARAM_MAX_EMBEDDED_PARAM 512 + +# keep ROMFS uncompressed as we don't have enough RAM +# to uncompress the bootloader at runtime +env ROMFS_UNCOMPRESSED True + +# don't share any DMA channels (there are enough for everyone) +DMA_NOSHARE *