hwdef.dat 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # hw definition file for processing by chibios_pins.py
  2. # Omnibus F4 V6
  3. # with F405 mcu, mpu6000 imu, bmp280 barometer, 7456 series osd, no flash log storage
  4. # MCU class and specific type
  5. MCU STM32F4xx STM32F405xx
  6. # board ID for firmware load
  7. APJ_BOARD_ID 137
  8. # crystal frequency
  9. OSCILLATOR_HZ 8000000
  10. STM32_PLLM_VALUE 8
  11. # board voltage
  12. STM32_VDD 330U
  13. # ChibiOS system timer
  14. STM32_ST_USE_TIMER 5
  15. # flash size
  16. FLASH_SIZE_KB 1024
  17. FLASH_RESERVE_START_KB 64
  18. # order of I2C buses
  19. I2C_ORDER I2C1
  20. # order of UARTs
  21. UART_ORDER OTG1 USART6 USART1 UART4 USART3
  22. #PINS
  23. PA10 USART1_RX USART1
  24. PA9 USART1_TX USART1
  25. PC6 USART6_TX USART6
  26. PC7 USART6_RX USART6
  27. PB10 USART3_TX USART3
  28. PB11 USART3_RX USART3
  29. # UART4 (only RX) #"TX" pin PA0 is used for RSSI_ADC_CHANNEL
  30. PA1 UART4_RX UART4
  31. #adc
  32. PC1 BAT_CURR_SENS ADC1 SCALE(1)
  33. PC2 BAT_VOLT_SENS ADC1 SCALE(1)
  34. PA0 RSSI_IN ADC1
  35. #pwm output # PWM out pins. Channel order (GPIOs) follows the ArduPilot motor
  36. # order conventions
  37. PB0 TIM1_CH2N TIM1 PWM(1) GPIO(50)
  38. PB1 TIM1_CH3N TIM1 PWM(2) GPIO(51)
  39. PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
  40. PB5 TIM3_CH2 TIM3 PWM(4) GPIO(53)
  41. PC9 TIM8_CH4 TIM8 PWM(5) GPIO(54)
  42. PC8 TIM8_CH3 TIM8 PWM(6) GPIO(55)
  43. # spi bus for IMU
  44. PA5 SPI1_SCK SPI1
  45. PA6 SPI1_MISO SPI1
  46. PA7 SPI1_MOSI SPI1
  47. PC12 SPI3_MOSI SPI3
  48. PC11 SPI3_MISO SPI3
  49. PC10 SPI3_SCK SPI3
  50. # SPI2 for flash
  51. PB15 SPI2_MOSI SPI2
  52. PB14 SPI2_MISO SPI2
  53. PB13 SPI2_SCK SPI2
  54. PB12 FLASH_CS CS
  55. PA4 MPU6000_CS CS #SPI1_NSS
  56. PA15 OSD_CS CS #SPI3_NSS
  57. PB3 BMP280_CS CS #SPI3_NSS
  58. # note that this board needs PULLUP on I2C pins
  59. PB8 I2C1_SCL I2C1 PULLUP
  60. PB9 I2C1_SDA I2C1 PULLUP
  61. PA13 JTMS-SWDIO SWD
  62. PA14 JTCK-SWCLK SWD
  63. PA8 LED OUTPUT HIGH GPIO(41)
  64. #PB4 TIM3_CH1 TIM3 GPIO(70) ALARM
  65. PA11 OTG_FS_DM OTG1
  66. PA12 OTG_FS_DP OTG1
  67. PC5 VBUS INPUT OPENDRAIN
  68. # LED strip output pad used for RC input
  69. # timer 4 is free (not used for pwm)
  70. PB6 TIM4_CH1 TIM4 RCININT PULLDOWN LOW
  71. #Omnibus F4 V3 and later had hw inverter on UART6
  72. #Overide it to use as GPS UART port
  73. #PC8 SBUS_INVERT_RX OUTPUT LOW
  74. #PC9 SBUS_INVERT_TX OUTPUT LOW
  75. ########### SPI Devices
  76. SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1*MHZ 8*MHZ
  77. SPIDEV bmp280 SPI3 DEVID3 BMP280_CS MODE3 1*MHZ 8*MHZ
  78. SPIDEV osd SPI3 DEVID4 OSD_CS MODE0 10*MHZ 10*MHZ
  79. SPIDEV dataflash SPI2 DEVID1 FLASH_CS MODE3 32*MHZ 32*MHZ
  80. # enable logging to dataflash
  81. define HAL_LOGGING_DATAFLASH
  82. # one IMU
  83. IMU Invensense SPI:mpu6000 ROTATION_YAW_90
  84. # one baro
  85. BARO BMP280 SPI:bmp280
  86. # no built-in compass, but probe the i2c bus for all possible
  87. # external compass types
  88. define ALLOW_ARM_NO_COMPASS
  89. define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
  90. define HAL_PROBE_EXTERNAL_I2C_COMPASSES
  91. define HAL_I2C_INTERNAL_MASK 0
  92. define STORAGE_FLASH_PAGE 1
  93. define HAL_STORAGE_SIZE 15360
  94. # define default battery setup
  95. define HAL_BATT_VOLT_PIN 12
  96. define HAL_BATT_CURR_PIN 11
  97. define HAL_BATT_VOLT_SCALE 11
  98. define HAL_BATT_CURR_SCALE 18.2
  99. #analog rssi pin (also could be used as analog airspeed input)
  100. #PA0 - ADC123_CH0
  101. define BOARD_RSSI_ANA_PIN 0
  102. define HAL_GPIO_A_LED_PIN 41
  103. #To have complementary channels work we define this
  104. define STM32_PWM_USE_ADVANCED TRUE
  105. define BOARD_PWM_COUNT_DEFAULT 6
  106. define OSD_ENABLED ENABLED
  107. #font for the osd
  108. ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin