hwdef.dat 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. # hw definition file for processing by chibios_pins.py
  2. # for OMNIBUSF7V2 hardware.
  3. @ thanks to betaflight for pin information
  4. # MCU class and specific type
  5. MCU STM32F7xx STM32F745xx
  6. define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_OMNIBUSF7V2
  7. # board ID for firmware load
  8. APJ_BOARD_ID 121
  9. # crystal frequency, setup to use external oscillator
  10. OSCILLATOR_HZ 8000000
  11. define STM32_LSECLK 32768U
  12. define STM32_LSEDRV (3U << 3U)
  13. define STM32_PLLSRC STM32_PLLSRC_HSE
  14. define STM32_PLLM_VALUE 8
  15. define STM32_PLLN_VALUE 432
  16. define STM32_PLLP_VALUE 2
  17. define STM32_PLLQ_VALUE 9
  18. FLASH_SIZE_KB 1024
  19. # reserve one sector for bootloader and 2 for storage
  20. FLASH_RESERVE_START_KB 96
  21. # board voltage
  22. STM32_VDD 330U
  23. # only one I2C bus
  24. I2C_ORDER I2C2
  25. # order of UARTs (and USB)
  26. UART_ORDER OTG1 USART6 USART1 USART3
  27. PA11 OTG_FS_DM OTG1
  28. PA12 OTG_FS_DP OTG1
  29. PA13 JTMS-SWDIO SWD
  30. PA14 JTCK-SWCLK SWD
  31. PE0 LED0 OUTPUT LOW
  32. PD15 TIM4_CH4 TIM4 GPIO(57) ALARM
  33. # ICM-20608 on SPI1
  34. PA4 MPU6000_CS CS
  35. # MPU6500 on SPI3
  36. PA15 MPU6500_CS CS
  37. # SPI1 for IMU and baro
  38. PA5 SPI1_SCK SPI1
  39. PA6 SPI1_MISO SPI1
  40. PA7 SPI1_MOSI SPI1
  41. # SPI2 for MAX7456 OSD
  42. PB12 MAX7456_CS CS
  43. PB13 SPI2_SCK SPI2
  44. PB14 SPI2_MISO SPI2
  45. PB15 SPI2_MOSI SPI2
  46. PC10 SPI3_SCK SPI3
  47. PC11 SPI3_MISO SPI3
  48. PC12 SPI3_MOSI SPI3
  49. # SPI4 for SDCard
  50. PE4 SDCARD_CS CS
  51. PE2 SPI4_SCK SPI4
  52. PE5 SPI4_MISO SPI4
  53. PE6 SPI4_MOSI SPI4
  54. # optional I2C device2, shared with USART3
  55. PB10 I2C2_SCL I2C2
  56. PB11 I2C2_SDA I2C2
  57. # baro is BMP280 on SPI1
  58. PA1 BMP280_CS CS
  59. # mag is on I2C if connected
  60. PC3 BATT_VOLTAGE_SENS ADC1 SCALE(1)
  61. PC2 BATT_CURRENT_SENS ADC1 SCALE(1)
  62. PC5 RSSI_ADC ADC1
  63. # setup two IMUs
  64. IMU Invensense SPI:mpu6000 ROTATION_NONE
  65. IMU Invensense SPI:mpu6500 ROTATION_YAW_90
  66. # USART1
  67. PA10 USART1_RX USART1
  68. PA9 USART1_TX USART1
  69. # USART2 for RC input, RX only
  70. PA3 TIM9_CH2 TIM9 RCININT FLOAT LOW
  71. # USART3
  72. PD9 USART3_RX USART3
  73. PD8 USART3_TX USART3
  74. # USART6
  75. PC7 USART6_RX USART6
  76. PC6 USART6_TX USART6
  77. # UART7, RX only?
  78. #PE7 UART7_RX UART7
  79. PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50)
  80. PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51)
  81. PE9 TIM1_CH1 TIM1 PWM(3) GPIO(52)
  82. PE11 TIM1_CH2 TIM1 PWM(4) GPIO(53)
  83. define HAL_STORAGE_SIZE 16384
  84. define STORAGE_FLASH_PAGE 1
  85. # spi devices
  86. SPIDEV bmp280 SPI1 DEVID1 BMP280_CS MODE3 1*MHZ 8*MHZ
  87. SPIDEV mpu6000 SPI1 DEVID2 MPU6000_CS MODE3 1*MHZ 4*MHZ
  88. SPIDEV mpu6500 SPI3 DEVID1 MPU6500_CS MODE3 1*MHZ 4*MHZ
  89. SPIDEV sdcard SPI4 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ
  90. SPIDEV osd SPI2 DEVID1 MAX7456_CS MODE0 10*MHZ 10*MHZ
  91. define HAL_OS_FATFS_IO 1
  92. define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
  93. define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
  94. # no built-in compass, but probe the i2c bus for all possible
  95. # external compass types
  96. define ALLOW_ARM_NO_COMPASS
  97. define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
  98. define HAL_PROBE_EXTERNAL_I2C_COMPASSES
  99. define HAL_I2C_INTERNAL_MASK 0
  100. define HAL_COMPASS_AUTO_ROT_DEFAULT 2
  101. # one baro
  102. BARO BMP280 SPI:bmp280
  103. define OSD_ENABLED ENABLED
  104. define HAL_OSD_TYPE_DEFAULT 1
  105. ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin
  106. # we are low on flash on this board
  107. define HAL_MINIMIZE_FEATURES 1