hwdef.dat 3.2 KB

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