From 67bed1d6c2eb2908fcc1adf7def9b7befede27f4 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sun, 14 Jan 2018 19:27:37 +1100 Subject: [PATCH] HAL_ChibiOS: added support for Sparky2 STM23F405 board --- .../AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat diff --git a/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat new file mode 100644 index 0000000000..565ee38bd9 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/sparky2/hwdef.dat @@ -0,0 +1,80 @@ +# hw definition file for processing by chibios_pins.py +# for Sparky2 hardware + +# MCU class and specific type +MCU STM32F4xx STM32F405xx + +# board ID for firmware load +APJ_BOARD_ID 11 + +# crystal frequency +OSCILLATOR_HZ 8000000 +STM32_PLLM_VALUE 8 + +FLASH_SIZE_KB 1024 + +# board voltage +STM32_VDD 330U + +# serial port for stdout via flexi-port (conn3) +STDOUT_SERIAL SD1 +STDOUT_BAUDRATE 115200 + +# USB setup +USB_VENDOR 0x0483 # ST +USB_PRODUCT 0x5740 +USB_STRING_MANUFACTURER "ArduPilot" +USB_STRING_PRODUCT "ChibiOS/RT Virtual COM Port" +USB_STRING_SERIAL "100" + +# only one I2C bus +I2C_ORDER I2C1 + +# order of UARTs (and USB) +UART_ORDER OTG1 USART1 + +PA4 VDD_5V_SENS ADC1 +# spi bus for IMU +PA5 SPI1_SCK SPI1 +PA6 SPI1_MISO SPI1 +PA7 SPI1_MOSI SPI1 + +PA9 USART1_TX USART1 +PA10 USART1_RX USART1 + +# PA10 IO-debug-console +PA11 OTG_FS_DM OTG1 +PA12 OTG_FS_DP OTG1 +PA13 JTMS-SWDIO SWD +PA14 JTCK-SWCLK SWD + +PB8 I2C1_SCL I2C1 +PB9 I2C1_SDA I2C1 + +PC4 MPU_CS CS + +PC6 TIM8_CH1 TIM8 PWM(1) +PC7 TIM8_CH2 TIM8 PWM(2) +PC8 TIM8_CH3 TIM8 PWM(3) +PC9 TIM8_CH4 TIM8 PWM(4) + +define HAL_STORAGE_SIZE 16384 +define STORAGE_FLASH_PAGE 1 + +FLASH_SIZE_KB 1024 + +# reserve 16k for bootloader and 32k for flash storage +FLASH_RESERVE_START_KB 48 + +define HAL_INS_DEFAULT HAL_INS_MPU60XX_SPI + +define HAL_COMPASS_DEFAULT HAL_COMPASS_HMC5843 +define HAL_COMPASS_HMC5843_I2C_BUS 1 +define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E + +# SPI devices +SPIDEV mpu6000 SPI1 DEVID1 MPU_CS MODE3 1*MHZ 8*MHZ + + + +