hwdef.dat 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. # The CUBE Yellow is a varient of The CUBE Black from ProfiCNC/Hex
  2. # with a STM32F777 MCU
  3. # MCU class and specific type
  4. MCU STM32F7xx STM32F777xx
  5. # we set a specific HAL_BOARD_SUBTYPE, allowing for custom config in
  6. # drivers. For this to be used the subtype needs to be added to
  7. # AP_HAL/AP_HAL_Boards.h as well
  8. define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_CHIBIOS_FMUV3
  9. # now we need to specify the APJ_BOARD_ID. This is the ID that the
  10. # bootloader presents to GCS software so it knows if this firmware is
  11. # suitable for the board. Please see
  12. # https://github.com/ArduPilot/Bootloader/blob/master/hw_config.h for
  13. # a list of current board IDs. If you add a new board type then please
  14. # get it added to that repository so we don't get conflicts.
  15. # Note that APJ is "ArduPilot JSON Firmware Format"
  16. # crystal frequency
  17. OSCILLATOR_HZ 24000000
  18. define STM32_LSECLK 32768U
  19. define STM32_LSEDRV (3U << 3U)
  20. define STM32_PLLSRC STM32_PLLSRC_HSE
  21. define STM32_PLLM_VALUE 24
  22. define STM32_PLLN_VALUE 432
  23. define STM32_PLLP_VALUE 2
  24. define STM32_PLLQ_VALUE 9
  25. # board ID for firmware load
  26. APJ_BOARD_ID 120
  27. # with 2M flash we can afford to optimize for speed
  28. env OPTIMIZE -O2
  29. # on some boards you will need to also set the various PLL values. See
  30. # the defaults in common/mcuconf.h, and use the define mechanism
  31. # explained later in this file to override values suitable for your
  32. # board. Refer to your MCU datasheet or examples from supported boards
  33. # in ChibiOS for the right values.
  34. # now define the voltage the MCU runs at. This is needed for ChibiOS
  35. # to set various internal driver limits. It is in 0.01 volt units
  36. # board voltage
  37. STM32_VDD 330U
  38. # this is the STM32 timer that ChibiOS will use for the low level
  39. # driver. This must be a 32 bit timer. We currently only support
  40. # timers 2, 3, 4, 5 and 21. See hal_st_lld.c in ChibiOS for details
  41. # ChibiOS system timer
  42. STM32_ST_USE_TIMER 5
  43. # now the size of flash in kilobytes, for creating the ld.script
  44. # flash size
  45. FLASH_SIZE_KB 2048
  46. # now define which UART is used for printf(). We rarely use printf()
  47. # in ChibiOS, so this is really only for debugging very early startup
  48. # in drivers.
  49. # serial port for stdout. This is optional. If you leave it out then
  50. # output from printf() lines will be thrown away (you can stil use
  51. # hal.console->printf() for the ArduPilot console, which is the first
  52. # UART in the UART_ORDER list). The value for STDOUT_SERIAL is a
  53. # serial device name, and must be for a serial device for which pins
  54. # are defined in this file. For example, SD7 is for UART7 (SD7 ==
  55. # "serial device 7" in ChibiOS).
  56. #STDOUT_SERIAL SD7
  57. #STDOUT_BAUDRATE 57600
  58. # now the USB setup, if you have USB. All of these settings are
  59. # option, and the ones below are the defaults. It ends up creating a
  60. # USB ID on Linux like this:
  61. # /dev/serial/by-id/usb-ArduPilot_fmuv3_3E0031000B51353233343932-if00
  62. # if creating a board for a RTF vehicle you may wish to customise these
  63. # USB setup
  64. USB_VENDOR 0x2DAE # ONLY FOR USE BY ProfiCNC / HEX! NOBODY ELSE
  65. USB_PRODUCT 0x1012
  66. USB_STRING_MANUFACTURER "Hex/ProfiCNC"
  67. USB_STRING_PRODUCT "CubeYellow"
  68. USB_STRING_SERIAL "%SERIAL%"
  69. # now define the order that I2C buses are presented in the hal.i2c API
  70. # in ArduPilot. For historical reasons inherited from HAL_PX4 the
  71. # 'external' I2C bus should be bus 1 in hal.i2c, and internal I2C bus
  72. # should be bus 0. On fmuv3 the STM32 I2C1 is our external bus and
  73. # I2C2 is our internal bus, so we need to setup the order as I2C2
  74. # followed by I2C1 in order to achieve the conventional order that
  75. # drivers expect
  76. # order of I2C buses
  77. I2C_ORDER I2C2 I2C1
  78. # now the UART order. These map to the hal.uartA to hal.uartF
  79. # objects. If you use a shorter list then HAL_Empty::UARTDriver
  80. # objects are substituted for later UARTs, or you can leave a gap by
  81. # listing one or more of the uarts as EMPTY
  82. # the normal usage of this ordering is:
  83. # 1) SERIAL0: console (primary mavlink, usually USB)
  84. # 2) SERIAL3: primary GPS
  85. # 3) SERIAL1: telem1
  86. # 4) SERIAL2: telem2
  87. # 5) SERIAL4: GPS2
  88. # 6) SERIAL5: extra UART (usually RTOS debug console)
  89. # order of UARTs (and USB)
  90. UART_ORDER OTG1 UART4 USART2 USART3 UART8 UART7 OTG2
  91. # if the board has an IOMCU connected via a UART then this defines the
  92. # UART to talk to that MCU. Leave it out for boards with no IOMCU
  93. # UART for IOMCU
  94. IOMCU_UART USART6
  95. # now we start on the pin definitions. Every pin used by ArduPilot
  96. # needs to be in this file. The format is P+port+pin. So PC4 is portC
  97. # pin4. For every pin the 2nd colum is the label. If this is a
  98. # peripheral that has an alternate function defined in the STM32
  99. # datasheet then the label must be the name of that alternative
  100. # function. The names are looked up in the python database for this
  101. # MCU. Please see STM32F427xx.py for the F427 database. That database
  102. # is used to automatically fill in the alternative function (and later
  103. # for the DMA channels).
  104. # The third column is the peripheral type. This must be one of the
  105. # following: UARTn, USARTn, OTGn, SPIn, I2Cn, ADCn, TIMn, SWD, SDIO,
  106. # INPUT, OUTPUT, CS
  107. # the fourth and later columns are for modifiers on the pin. The
  108. # possible modifiers are
  109. # pin speed: SPEED_VERYLOW, SPEED_LOW, SPEED_MEDIUM, SPEED_HIGH
  110. # pullup: PULLUP, PULLDOWN, FLOATING
  111. # out type: OPENDRAIN, PUSHPULL
  112. # default value: LOW, HIGH
  113. # Additionally, each class of pin peripheral can have extra modifiers
  114. # suitable for that pin type. For example, for an OUTPUT you can map
  115. # it to a GPIO number in hal.gpio using the GPIO(n) modifier. For ADC
  116. # inputs you can apply a scaling factor (to bring it to unit volts)
  117. # using the SCALE(x) modifier. See the examples below for more
  118. # modifiers, or read the python code in chibios_hwdef.py
  119. # now we define UART4 which is for the GPS, which is a GPS. Be careful
  120. # of the difference between USART and UART. Check the STM32F427xx.py
  121. # if unsure which it is. For a UART we need to specify at least TX and
  122. # RX pins.
  123. # this pins in this file can be defined in any order.
  124. # UART4 serial GPS
  125. PA0 UART4_TX UART4
  126. PA1 UART4_RX UART4
  127. # now define the primary battery connectors. The labels we choose hear
  128. # are used to create defines for pins in the various drivers, so
  129. # choose names that match existing board setups where possible. Here
  130. # we define two pins PA2 and PA3 for voltage and current sensing, with
  131. # a scale factor of 1.0 and connected on ADC1. The pin number this
  132. # maps to in hal.adc is automatically determined using the datasheet
  133. # tables in STM32F427xx.py
  134. PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1)
  135. PA3 BATT_CURRENT_SENS ADC1 SCALE(1)
  136. # now the VDD sense pin. This is used to sense primary board voltags
  137. PA4 VDD_5V_SENS ADC1 SCALE(2)
  138. # now the first SPI bus. At minimum you need SCK, MISO and MOSI pin
  139. definitions. You can add speed modifiers if you want them, otherwise
  140. the defaults for the peripheral class are used.
  141. PA5 SPI1_SCK SPI1
  142. PA6 SPI1_MISO SPI1
  143. PA7 SPI1_MOSI SPI1
  144. # this defines an output pin which will default to output LOW. It is a
  145. # pin that enables peripheral power on this board
  146. PA8 VDD_5V_PERIPH_EN OUTPUT LOW
  147. # this is the pin that senses USB being connected. It is an input pin
  148. # setup as OPENDRAIN
  149. PA9 VBUS INPUT OPENDRAIN
  150. # this is a commented out pin for talking to the debug uart on the
  151. # IOMCU, not used yet, but left as a comment (with a '#' in front) for
  152. # future reference
  153. # PA10 IO-debug-console
  154. # now we define the pins that USB is connected on
  155. PA11 OTG_FS_DM OTG1
  156. PA12 OTG_FS_DP OTG1
  157. # these are the pins for SWD debugging with a STlinkv2 or black-magic probe
  158. PA13 JTMS-SWDIO SWD
  159. PA14 JTCK-SWCLK SWD
  160. # this defines the PWM pin for the buzzer (if there is one). It is
  161. # also mapped to a GPIO output so you can play with the buzzer via
  162. # MAVLink relay commands if you want to
  163. # PWM output for buzzer
  164. PA15 TIM2_CH1 TIM2 GPIO(77) ALARM
  165. # this defines a couple of general purpose outputs, mapped to GPIO
  166. # numbers 1 and 2 for users
  167. PB0 EXTERN_GPIO1 OUTPUT GPIO(1)
  168. PB1 EXTERN_GPIO2 OUTPUT GPIO(2)
  169. # this defines some input pins, currently unused
  170. PB2 BOOT1 INPUT
  171. PB3 FMU_SW0 INPUT
  172. # this defines the pins for the 2nd CAN interface, if available
  173. PB6 CAN2_TX CAN2
  174. PB12 CAN2_RX CAN2
  175. # now the first I2C bus. The pin speeds are automatically setup
  176. # correctly, but can be overridden here if needed.
  177. PB8 I2C1_SCL I2C1
  178. PB9 I2C1_SDA I2C1
  179. # now the 2nd I2C bus
  180. PB10 I2C2_SCL I2C2
  181. PB11 I2C2_SDA I2C2
  182. # the 2nd SPI bus
  183. PB13 SPI2_SCK SPI2
  184. PB14 SPI2_MISO SPI2
  185. PB15 SPI2_MOSI SPI2
  186. # this input pin is used to detect that power is valid on USB
  187. PC0 VBUS_VALID INPUT
  188. # this defines the CS pin for the magnetometer and first IMU. Note
  189. # that CS pins are software controlled, and are not tied to a particular
  190. # SPI bus
  191. PC1 MAG_CS CS
  192. PC2 MPU_CS CS
  193. # this defines more ADC inputs
  194. PC3 AUX_POWER ADC1 SCALE(1)
  195. PC4 AUX_ADC2 ADC1 SCALE(1)
  196. # and the analog input for airspeed (rarely used these days)
  197. PC5 PRESSURE_SENS ADC1 SCALE(2)
  198. # this sets up the UART for talking to the IOMCU. Note that it is
  199. # vital that this UART has DMA available. See the DMA settings below
  200. # for more information
  201. # USART6 to IO
  202. PC6 USART6_TX USART6
  203. PC7 USART6_RX USART6
  204. # now setup the pins for the microSD card, if available
  205. PC8 SDMMC_D0 SDMMC1
  206. PC9 SDMMC_D1 SDMMC1
  207. PC10 SDMMC_D2 SDMMC1
  208. PC11 SDMMC_D3 SDMMC1
  209. PC12 SDMMC_CK SDMMC1
  210. PD2 SDMMC_CMD SDMMC1
  211. # more CS pins for more sensors. The labels for all CS pins need to
  212. # match the SPI device table later in this file
  213. PC13 GYRO_EXT_CS CS
  214. PC14 BARO_EXT_CS CS
  215. PC15 ACCEL_EXT_CS CS
  216. PD7 BARO_CS CS
  217. PE4 MPU_EXT_CS CS
  218. # the first CAN bus
  219. PD0 CAN1_RX CAN1
  220. PD1 CAN1_TX CAN1
  221. # Another USART, this one for telem1. This one has RTS and CTS lines
  222. # USART2 serial2 telem1
  223. PD3 USART2_CTS USART2
  224. PD4 USART2_RTS USART2
  225. PD5 USART2_TX USART2
  226. PD6 USART2_RX USART2
  227. # the telem2 USART, also with RTS/CTS available
  228. # USART3 serial3 telem2
  229. PD8 USART3_TX USART3
  230. PD9 USART3_RX USART3
  231. PD11 USART3_CTS USART3
  232. PD12 USART3_RTS USART3
  233. # the CS pin for FRAM (ramtron). This one is marked as using
  234. # SPEED_VERYLOW, which matches the HAL_PX4 setup
  235. PD10 FRAM_CS CS SPEED_VERYLOW
  236. # now we start defining some PWM pins. We also map these pins to GPIO
  237. # values, so users can set BRD_PWM_COUNT to choose how many of the PWM
  238. # outputs on the primary MCU are setup as PWM and how many as
  239. # GPIOs. To match HAL_PX4 we number the GPIOs for the PWM outputs
  240. # starting at 50
  241. PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50)
  242. PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
  243. PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
  244. PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
  245. PD13 TIM4_CH2 TIM4 PWM(5) GPIO(54)
  246. PD14 TIM4_CH3 TIM4 PWM(6) GPIO(55)
  247. # Pin for PWM Voltage Selection
  248. PB4 PWM_VOLT_SEL OUTPUT HIGH GPIO(3)
  249. # this is the invensense data-ready pin. We don't use it in the
  250. # default driver
  251. PD15 MPU_DRDY INPUT
  252. # now the 2nd GPS UART
  253. # UART8 serial4 GPS2
  254. PE0 UART8_RX UART8
  255. PE1 UART8_TX UART8
  256. # now setup SPI bus4
  257. PE2 SPI4_SCK SPI4
  258. PE5 SPI4_MISO SPI4
  259. PE6 SPI4_MOSI SPI4
  260. # this is the pin to enable the sensors rail. It can be used to power
  261. # cycle sensors to recover them in case there are problems with power on
  262. # timing affecting sensor stability. We pull it high by default
  263. PE3 VDD_3V3_SENSORS_EN OUTPUT HIGH
  264. # UART7 maps to uartF in the HAL (serial5 in SERIALn_ parameters)
  265. PE7 UART7_RX UART7
  266. PE8 UART7_TX UART7
  267. # define a LED, mapping it to GPIO(0)
  268. PE12 FMU_LED_AMBER OUTPUT GPIO(0)
  269. # power flag pins. These tell the MCU the status of the various power
  270. # supplies that are available. The pin names need to exactly match the
  271. # names used in AnalogIn.cpp.
  272. PB5 VDD_BRICK_VALID INPUT PULLUP
  273. PB7 VDD_SERVO_VALID INPUT PULLUP
  274. PE10 VDD_5V_HIPOWER_OC INPUT PULLUP
  275. PE15 VDD_5V_PERIPH_OC INPUT PULLUP
  276. # now the SPI device table. This table creates all accessible SPI
  277. # devices, giving the name of the device (which is used by device
  278. # drivers to open the device), plus which SPI bus it it on, what
  279. # device ID will be used (which controls the IDs used in parameters
  280. # such as COMPASS_DEV_ID, so we can detect when the list of devices
  281. # changes between reboots for calibration purposes), the SPI mode to
  282. # use, and the low and high speed settings for the device
  283. # You can define more SPI devices than you actually have, to allow for
  284. # flexibility in board setup, and the driver code can probe to see
  285. # which are responding
  286. # The DEVID values and device names are chosen to match the PX4 port
  287. # of ArduPilot so users don't need to re-do their accel and compass
  288. # calibrations when moving to ChibiOS
  289. SPIDEV ms5611 SPI1 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ
  290. SPIDEV ms5611_ext SPI4 DEVID2 BARO_EXT_CS MODE3 20*MHZ 20*MHZ
  291. SPIDEV mpu6000 SPI1 DEVID4 MPU_CS MODE3 2*MHZ 8*MHZ
  292. SPIDEV icm20608-am SPI1 DEVID2 ACCEL_EXT_CS MODE3 4*MHZ 8*MHZ
  293. SPIDEV mpu9250 SPI1 DEVID4 MPU_CS MODE3 4*MHZ 8*MHZ
  294. SPIDEV mpu9250_ext SPI4 DEVID1 MPU_EXT_CS MODE3 4*MHZ 8*MHZ
  295. SPIDEV icm20948 SPI1 DEVID4 MPU_CS MODE3 4*MHZ 8*MHZ
  296. SPIDEV icm20948_ext SPI4 DEVID1 MPU_EXT_CS MODE3 4*MHZ 8*MHZ
  297. SPIDEV hmc5843 SPI1 DEVID5 MAG_CS MODE3 11*MHZ 11*MHZ
  298. SPIDEV lsm9ds0_g SPI1 DEVID1 GYRO_EXT_CS MODE3 11*MHZ 11*MHZ
  299. SPIDEV lsm9ds0_am SPI1 DEVID2 ACCEL_EXT_CS MODE3 11*MHZ 11*MHZ
  300. SPIDEV lsm9ds0_ext_g SPI4 DEVID4 GYRO_EXT_CS MODE3 11*MHZ 11*MHZ
  301. SPIDEV lsm9ds0_ext_am SPI4 DEVID3 ACCEL_EXT_CS MODE3 11*MHZ 11*MHZ
  302. SPIDEV icm20602_ext SPI4 DEVID4 GYRO_EXT_CS MODE3 4*MHZ 8*MHZ
  303. SPIDEV ramtron SPI2 DEVID10 FRAM_CS MODE3 8*MHZ 8*MHZ
  304. SPIDEV external0m0 SPI4 DEVID5 MPU_EXT_CS MODE0 2*MHZ 2*MHZ
  305. SPIDEV external0m1 SPI4 DEVID5 MPU_EXT_CS MODE1 2*MHZ 2*MHZ
  306. SPIDEV external0m2 SPI4 DEVID5 MPU_EXT_CS MODE2 2*MHZ 2*MHZ
  307. SPIDEV external0m3 SPI4 DEVID5 MPU_EXT_CS MODE3 2*MHZ 2*MHZ
  308. SPIDEV pixartPC15 SPI4 DEVID13 ACCEL_EXT_CS MODE3 2*MHZ 2*MHZ
  309. # Now some commented out SPI device names which can be used by
  310. # developers to test that the clock calculations are right for a
  311. # bus. This is used in conjunction with the mavproxy devop module
  312. # for SPI clock testing
  313. #SPIDEV clock500 SPI4 DEVID5 MPU_EXT_CS MODE0 500*KHZ 500*KHZ # gives 329KHz
  314. #SPIDEV clock1 SPI4 DEVID5 MPU_EXT_CS MODE0 1*MHZ 1*MHZ # gives 657kHz
  315. #SPIDEV clock2 SPI4 DEVID5 MPU_EXT_CS MODE0 2*MHZ 2*MHZ # gives 1.3MHz
  316. #SPIDEV clock4 SPI4 DEVID5 MPU_EXT_CS MODE0 4*MHZ 4*MHZ # gives 2.6MHz
  317. #SPIDEV clock8 SPI4 DEVID5 MPU_EXT_CS MODE0 8*MHZ 8*MHZ # gives 5.5MHz
  318. #SPIDEV clock16 SPI4 DEVID5 MPU_EXT_CS MODE0 16*MHZ 16*MHZ # gives 10.6MHz
  319. # three IMUs, but allow for different varients. First two IMUs are
  320. # isolated, 3rd isn't
  321. IMU Invensense SPI:mpu9250_ext ROTATION_PITCH_180
  322. # the 3 rotations for the LSM9DS0 driver are for the accel, the gyro
  323. # and the H varient of the gyro
  324. IMU LSM9DS0 SPI:lsm9ds0_ext_g SPI:lsm9ds0_ext_am ROTATION_ROLL_180_YAW_270 ROTATION_ROLL_180_YAW_90 ROTATION_ROLL_180_YAW_90
  325. # 3rd non-isolated IMU
  326. IMU Invensense SPI:mpu9250 ROTATION_YAW_270
  327. # alternative IMU set for newer cubes
  328. IMU Invensense SPI:icm20602_ext ROTATION_ROLL_180_YAW_270
  329. IMU Invensensev2 SPI:icm20948_ext ROTATION_PITCH_180
  330. IMU Invensensev2 SPI:icm20948 ROTATION_YAW_270
  331. define HAL_DEFAULT_INS_FAST_SAMPLE 5
  332. # two baros
  333. BARO MS56XX SPI:ms5611_ext
  334. BARO MS56XX SPI:ms5611
  335. # two compasses. First is in the LSM303D
  336. COMPASS LSM303D SPI:lsm9ds0_ext_am ROTATION_YAW_270
  337. # 2nd compass is part of the 2nd invensense IMU
  338. COMPASS AK8963:probe_mpu9250 1 ROTATION_YAW_270
  339. # compass as part of ICM20948 on newer cubes
  340. COMPASS AK09916:probe_ICM20948 0 ROTATION_ROLL_180_YAW_90
  341. # also probe for external compasses
  342. define HAL_PROBE_EXTERNAL_I2C_COMPASSES
  343. # this adds a C define which sets up the ArduPilot architecture
  344. # define. Any line starting with 'define' is copied literally as
  345. # a #define in the hwdef.h header
  346. define HAL_CHIBIOS_ARCH_FMUV3 1
  347. # now some defines for logging and terrain data files
  348. define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
  349. define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
  350. # we need to tell HAL_ChibiOS/Storage.cpp how much storage is
  351. # available (in bytes)
  352. define HAL_STORAGE_SIZE 16384
  353. # allow to have have a dedicated safety switch pin
  354. define HAL_HAVE_SAFETY_SWITCH 1
  355. # this enables the use of a ramtron device for storage, if one is
  356. # found on SPI. You must have a ramtron entry in the SPI device table
  357. # enable RAMTROM parameter storage
  358. define HAL_WITH_RAMTRON 1
  359. # setup for the possibility of an IMU heater as the The CUBE has
  360. # an IMU header
  361. define HAL_HAVE_IMU_HEATER 1
  362. # enable FAT filesystem support (needs a microSD defined via SDIO)
  363. define HAL_OS_FATFS_IO 1
  364. # enable RTSCTS support. You should define this if you have any UARTs
  365. with RTS/CTS pins
  366. define AP_FEATURE_RTSCTS 1
  367. # enable SBUS_OUT on IOMCU (if you have an IOMCU)
  368. define AP_FEATURE_SBUS_OUT 1
  369. # now setup the default battery pins driver analog pins and default
  370. # scaling for the power brick
  371. define HAL_BATT_VOLT_PIN 2
  372. define HAL_BATT_CURR_PIN 3
  373. define HAL_BATT_VOLT_SCALE 10.1
  374. define HAL_BATT_CURR_SCALE 17.0
  375. define HAL_GPIO_PWM_VOLT_PIN 3
  376. # this defines the default maximum clock on I2C devices.
  377. define HAL_I2C_MAX_CLOCK 100000
  378. # uncomment the lines below to enable strict API
  379. # checking in ChibiOS
  380. # define CH_DBG_ENABLE_ASSERTS TRUE
  381. # define CH_DBG_ENABLE_CHECKS TRUE
  382. # define CH_DBG_SYSTEM_STATE_CHECK TRUE
  383. # define CH_DBG_ENABLE_STACK_CHECK TRUE
  384. # we can't share IO UART (USART6)
  385. DMA_NOSHARE USART6_TX USART6_RX ADC1
  386. DMA_PRIORITY USART6*
  387. # start on 4th sector (1st sector for bootloader, 2 for extra storage)
  388. FLASH_RESERVE_START_KB 96
  389. # fallback storage in case FRAM is not populated
  390. define STORAGE_FLASH_PAGE 1
  391. # list of files to put in ROMFS. For fmuv3 we need an IO firmware so
  392. # we can automatically update the IOMCU firmware on boot. The format
  393. # is "ROMFS ROMFS-filename source-filename". Paths are relative to the
  394. # ardupilot root
  395. ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_highpolh.bin