hwdef.dat 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. # hw definition file for processing by chibios_hwdef.py
  2. # for VRBRAINv54 hardware
  3. define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_VRBRAIN_V54
  4. # MCU class and specific type
  5. MCU STM32F4xx STM32F427xx
  6. # board ID for firmware load
  7. APJ_BOARD_ID 1154
  8. # crystal frequency
  9. OSCILLATOR_HZ 24000000
  10. # flash size
  11. FLASH_SIZE_KB 2048
  12. # board voltage
  13. STM32_VDD 330U
  14. # USB setup
  15. USB_VENDOR 0x27AC
  16. USB_PRODUCT 0x1154
  17. USB_STRING_MANUFACTURER "Laser Navigation"
  18. USB_STRING_SERIAL "%SERIAL%"
  19. # ChibiOS system timer
  20. STM32_ST_USE_TIMER 5
  21. # only one I2C bus
  22. I2C_ORDER I2C2 I2C1
  23. # order of UARTs (and USB)
  24. UART_ORDER OTG1 USART1 USART3 USART2
  25. STDOUT_SERIAL SD3
  26. STDOUT_BAUDRATE 57600
  27. PA0 BUZZER OUTPUT LOW GPIO(32)
  28. PA1 TIM2_CH2 TIM2 PWM(1) GPIO(50)
  29. PA2 TIM2_CH3 TIM2 PWM(2) GPIO(51)
  30. PA3 TIM2_CH4 TIM2 PWM(3) GPIO(52)
  31. PA4 SDCARD_CS CS
  32. PA5 SPI1_SCK SPI1
  33. PA6 SPI1_MISO SPI1
  34. PA7 SPI1_MOSI SPI1
  35. #PA8
  36. PA9 VBUS INPUT
  37. #P10
  38. PA11 OTG_FS_DM OTG1
  39. PA12 OTG_FS_DP OTG1
  40. PA13 JTMS-SWDIO SWD
  41. PA14 JTCK-SWCLK SWD
  42. #PA15
  43. PB0 TIM3_CH3 TIM3 PWM(5) GPIO(54)
  44. PB1 TIM3_CH4 TIM3 PWM(6) GPIO(55)
  45. #PB2
  46. PB3 LED_EXT3 OUTPUT GPIO(30)
  47. PB4 LED_EXT4 OUTPUT GPIO(31)
  48. PB5 TIM3_CH2 TIM3 PWM(4) GPIO(53)
  49. PB6 USART1_TX USART1
  50. PB7 USART1_RX USART1
  51. PB8 I2C1_SCL I2C1
  52. PB9 I2C1_SDA I2C1
  53. PB10 I2C2_SCL I2C2
  54. PB11 I2C2_SDA I2C2
  55. #PB12
  56. PB13 SPI2_SCK SPI2
  57. PB14 SPI2_MISO SPI2
  58. PB15 SPI2_MOSI SPI2
  59. PC0 BATT_VOLTAGE_SENS ADC1
  60. PC1 BATT_CURRENT_SENS ADC1
  61. #PC2
  62. #PC3
  63. #PC4
  64. PC5 LED_GREEN OUTPUT GPIO(25)
  65. #PC6
  66. PC7 TIM8_CH2 TIM8 RCIN FLOAT LOW
  67. PC8 RELAY_1 OUTPUT LOW GPIO(33)
  68. PC9 RELAY_2 OUTPUT LOW GPIO(34)
  69. PC10 SPI3_SCK SPI3
  70. PC11 SPI3_MISO SPI3
  71. PC12 SPI3_MOSI SPI3
  72. #PC13
  73. #PC14
  74. #PC15
  75. #PD0
  76. #PD1
  77. #PD2
  78. #PD3
  79. #PD4
  80. PD5 USART2_TX USART2
  81. PD6 USART2_RX USART2
  82. PD7 SBUS_INV OUTPUT
  83. PD8 USART3_TX USART3
  84. PD9 USART3_RX USART3
  85. #PD10
  86. #PD11
  87. PD12 TIM4_CH1 TIM4 PWM(8) GPIO(57)
  88. PD13 TIM4_CH2 TIM4 PWM(7) GPIO(56)
  89. PD15 LED_RED OUTPUT GPIO(27)
  90. PD14 LED_BLUE OUTPUT GPIO(26)
  91. PE0 BARO_CS CS
  92. #PE1
  93. PE2 LED_EXT1 OUTPUT GPIO(29)
  94. PE3 LED_EXT2 OUTPUT GPIO(28)
  95. PE4 RELAY_3 OUTPUT LOW GPIO(35)
  96. #PE5 TIM9_CH1 TIM9 PWM(13) GPIO(62)
  97. #PE6 TIM9_CH2 TIM9 PWM(14) GPIO(63)
  98. #PE7
  99. #PE8
  100. PE9 TIM1_CH1 TIM1 PWM(9) GPIO(58)
  101. PE10 MPU_CS CS
  102. PE11 TIM1_CH2 TIM1 PWM(10) GPIO(59)
  103. #PE12
  104. PE13 TIM1_CH3 TIM1 PWM(11) GPIO(60)
  105. PE14 TIM1_CH4 TIM1 PWM(12) GPIO(61)
  106. PE15 FRAM_CS CS
  107. # SPI device table. The DEVID values are chosen to match the PX4 port
  108. # of ArduPilot so users don't need to re-do their accel and compass calibrations
  109. # when moving to ChibiOS
  110. SPIDEV ms5611 SPI1 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ
  111. SPIDEV mpu6000 SPI2 DEVID4 MPU_CS MODE3 2*MHZ 8*MHZ
  112. SPIDEV ramtron SPI3 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ
  113. SPIDEV sdcard SPI3 DEVID1 SDCARD_CS MODE0 400*KHZ 25*MHZ
  114. define HAL_CHIBIOS_ARCH_BRAINV54 1
  115. define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
  116. define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
  117. define HAL_STORAGE_SIZE 16384
  118. define STORAGE_FLASH_PAGE 22
  119. # enable RAMTROM parameter storage
  120. define HAL_WITH_RAMTRON 1
  121. # enable FAT filesystem
  122. define HAL_OS_FATFS_IO 1
  123. define HAL_GPIO_LED_ON 0
  124. define HAL_GPIO_LED_OFF 1
  125. define HAL_GPIO_A_LED_PIN 25
  126. define HAL_GPIO_B_LED_PIN 26
  127. define HAL_GPIO_C_LED_PIN 27
  128. define EXTERNAL_LED_GPS 28
  129. define EXTERNAL_LED_ARMED 29
  130. define EXTERNAL_LED_MOTOR1 30
  131. define EXTERNAL_LED_MOTOR2 31
  132. define RELAY1_PIN_DEFAULT 33
  133. define RELAY2_PIN_DEFAULT 34
  134. define RELAY3_PIN_DEFAULT 35
  135. define HAL_BUZZER_PIN 32
  136. define HAL_BUZZER_ON 1
  137. define HAL_BUZZER_OFF 0
  138. # battery setup
  139. define HAL_BATT_VOLT_PIN 10
  140. define HAL_BATT_CURR_PIN 11
  141. define HAL_BATT_VOLT_SCALE 10.1
  142. define HAL_BATT_CURR_SCALE 17.0
  143. define STM32_PWM_USE_ADVANCED TRUE
  144. # 12 PWM available by default
  145. define BOARD_PWM_COUNT_DEFAULT 14