hwdef.dat 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. # hw definition file for processing by chibios_hwdef.py
  2. # for Furious FPV F35 Lightning type hardware
  3. # MCU class and specific type
  4. MCU STM32F4xx STM32F405xx
  5. # board ID for firmware load
  6. APJ_BOARD_ID 135
  7. # crystal frequency
  8. OSCILLATOR_HZ 8000000
  9. STM32_PLLM_VALUE 8
  10. # board voltage
  11. STM32_VDD 330U
  12. # ChibiOS system timer
  13. STM32_ST_USE_TIMER 5
  14. # flash size
  15. FLASH_SIZE_KB 1024
  16. FLASH_RESERVE_START_KB 64
  17. # console
  18. #STDOUT_SERIAL SD1
  19. #STDOUT_BAUDRATE 57600
  20. # order of I2C buses
  21. I2C_ORDER I2C1
  22. # order of UARTs (UART3RX used for RCInput, UART4RX and USART6RX not pinned out)
  23. UART_ORDER OTG1 USART2 USART1 UART5 EMPTY UART4 USART6
  24. # USB sensing
  25. #PA9 VBUS INPUT OPENDRAIN
  26. # USB
  27. PA11 OTG_FS_DM OTG1
  28. PA12 OTG_FS_DP OTG1
  29. # UART1 (telem1)
  30. PA9 USART1_TX USART1
  31. PA10 USART1_RX USART1
  32. # UART2 (GPS)
  33. PA2 USART2_TX USART2
  34. PA3 USART2_RX USART2
  35. # UART3RX (RCInput)
  36. PB11 TIM2_CH4 TIM2 RCININT FLOAT LOW
  37. PA8 SBUS_INVERT_RX OUTPUT
  38. # UART4 (user), only TX pinned out
  39. PA0 UART4_TX UART4
  40. PC11 UART4_RX UART4
  41. # UART5 (telem2)
  42. PC12 UART5_TX UART5
  43. PD2 UART5_RX UART5
  44. # USART6 (user), only TX pinned out as "SPO" pin with hw inverter
  45. PC6 USART6_TX USART6
  46. PC7 USART6_RX USART6
  47. # ADCs
  48. PC1 BATT_VOLTAGE_SENS ADC1 SCALE(1)
  49. PC2 BATT_CURRENT_SENS ADC1 SCALE(1)
  50. PC3 RSSI_IN ADC1 SCALE(2)
  51. define BOARD_RSSI_ANA_PIN 13
  52. # also could be used as analog airspeed input
  53. #PC3 PRESSURE_SENS ADC1 SCALE(2)
  54. # VDD sense pin
  55. #PA4 VDD_5V_SENS ADC1 SCALE(2)
  56. # LED
  57. PC10 LED OUTPUT HIGH GPIO(57)
  58. define HAL_GPIO_A_LED_PIN 57
  59. # SPI
  60. PA5 SPI1_SCK SPI1
  61. PA6 SPI1_MISO SPI1
  62. PA7 SPI1_MOSI SPI1
  63. PB13 SPI2_SCK SPI2
  64. PB14 SPI2_MISO SPI2
  65. PB15 SPI2_MOSI SPI2
  66. PB3 SPI3_SCK SPI3
  67. PB4 SPI3_MISO SPI3
  68. PB5 SPI3_MOSI SPI3
  69. # CS pins
  70. PC0 MPU9250_CS CS
  71. PA4 OSD_CS CS
  72. PC5 BMP280_CS CS
  73. #PB12 SDCARD_CS CS
  74. PC4 MPU9250_DRDY INPUT
  75. # These are the pins for SWD debugging with a STlinkv2 or black-magic probe.
  76. #PA13 JTMS-SWDIO SWD
  77. #PA14 JTCK-SWCLK SWD
  78. # passive buzzer disabled, optional timers 2 and 5 used for RCinput and STM32
  79. # PA1 TIM2_CH2 TIM2 GPIO(77) ALARM
  80. # use active buzzer instead
  81. PA1 BUZZER OUTPUT GPIO(80) LOW
  82. define HAL_BUZZER_PIN 80
  83. define HAL_BUZZER_ON 1
  84. define HAL_BUZZER_OFF 0
  85. # I2C
  86. PB6 I2C1_SCL I2C1
  87. PB7 I2C1_SDA I2C1
  88. # PWM pins S1-S6
  89. define BOARD_PWM_COUNT_DEFAULT 6
  90. define STM32_PWM_USE_ADVANCED TRUE
  91. PC8 TIM8_CH3 TIM8 PWM(1) GPIO(50)
  92. PC9 TIM8_CH4 TIM8 PWM(2) GPIO(51)
  93. PB8 TIM4_CH3 TIM4 PWM(3) GPIO(52)
  94. PB9 TIM4_CH4 TIM4 PWM(4) GPIO(53)
  95. PB0 TIM3_CH3 TIM3 PWM(5) GPIO(54)
  96. PB1 TIM3_CH4 TIM3 PWM(6) GPIO(55)
  97. # SPI device table
  98. SPIDEV mpu9250 SPI3 DEVID1 MPU9250_CS MODE3 4*MHZ 8*MHZ
  99. SPIDEV bmp280 SPI3 DEVID2 BMP280_CS MODE3 1*MHZ 8*MHZ
  100. SPIDEV osd SPI1 DEVID1 OSD_CS MODE0 10*MHZ 10*MHZ
  101. #SPIDEV sdcard SPI2 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ
  102. # one IMU
  103. IMU Invensense SPI:mpu9250 ROTATION_YAW_90
  104. # one baro
  105. BARO BMP280 SPI:bmp280
  106. # probe external compasses plus one in 9250
  107. COMPASS AK8963:probe_mpu9250 0 ROTATION_YAW_90
  108. define HAL_PROBE_EXTERNAL_I2C_COMPASSES
  109. define HAL_I2C_INTERNAL_MASK 0
  110. # external baro probing
  111. define HAL_PROBE_EXTERNAL_I2C_BAROS
  112. # no onboard SD, filesystem support disabled until flash logging implemented
  113. #define HAL_OS_FATFS_IO 1
  114. #define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
  115. #define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
  116. # OSD support
  117. define OSD_ENABLED ENABLED
  118. define HAL_OSD_TYPE_DEFAULT 1
  119. ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
  120. # available storage
  121. define HAL_STORAGE_SIZE 15360
  122. define STORAGE_FLASH_PAGE 1
  123. # defaults for battery monitoring
  124. define HAL_BATT_MONITOR_DEFAULT 4
  125. define HAL_BATT_VOLT_PIN 11
  126. define HAL_BATT_CURR_PIN 12
  127. define HAL_BATT_VOLT_SCALE 11
  128. define HAL_BATT_CURR_SCALE 25