| | | |
1 | 1 | | # hw definition file for processing by chibios_hwdef.py |
2 | 2 | | # for Pixracer bootloader |
4 | 4 | | # MCU class and specific type |
5 | 5 | | MCU STM32F4xx STM32F427xx |
7 | 7 | | # crystal frequency |
8 | 8 | | OSCILLATOR_HZ 24000000 |
10 | 10 | | # board ID for firmware load |
11 | 11 | | APJ_BOARD_ID 1101 |
13 | 13 | | FLASH_SIZE_KB 2048 |
15 | 15 | | # ChibiOS system timer |
16 | 16 | | STM32_ST_USE_TIMER 5 |
18 | 18 | | # setup build for a peripheral firmware |
19 | 19 | | env AP_PERIPH 1 |
20 | 20 | | define PERIPH_FW TRUE |
21 | 21 | | define HAL_DISABLE_LOOP_DELAY |
23 | 23 | | # bootloader is installed at zero offset |
24 | 24 | | FLASH_RESERVE_START_KB 0 |
26 | 26 | | # the location where the bootloader will put the firmware |
27 | 27 | | # we use first 32k |
28 | 28 | | FLASH_BOOTLOADER_LOAD_KB 32 |
30 | 30 | | # order of UARTs (and USB) |
31 | 31 | | SERIAL_ORDER OTG1 UART2 |
33 | 33 | | PB1 LED_BOOTLOADER OUTPUT |
34 | 34 | | PB3 LED_ACTIVITY OUTPUT |
35 | 35 | | define HAL_LED_ON 1 |
37 | 37 | | PA9 VBUS INPUT |
39 | 39 | | STDOUT_SERIAL SD2 |
40 | 40 | | STDOUT_BAUDRATE 57600 |
41 | 41 | | # make bl baudrate match debug baudrate for easier debugging |
42 | 42 | | define BOOTLOADER_BAUDRATE 57600 |
44 | 44 | | # USART2 serial2 telem1 |
45 | 45 | | PD3 USART2_CTS USART2 |
46 | 46 | | PD4 USART2_RTS USART2 |
47 | 47 | | PD5 USART2_TX USART2 |
48 | 48 | | PD6 USART2_RX USART2 |
50 | 50 | | # OTG1 |
51 | 51 | | PA11 OTG_FS_DM OTG1 |
52 | 52 | | PA12 OTG_FS_DP OTG1 |
54 | 54 | | PA13 JTMS-SWDIO SWD |
55 | 55 | | PA14 JTCK-SWCLK SWD |
57 | 57 | | define HAL_STORAGE_SIZE 16384 |
59 | 59 | | # Add CS pins to ensure they are high in bootloader |
60 | 60 | | PC2 MPU9250_CS CS |
61 | 61 | | PC15 20608_CS CS |
62 | 62 | | PD7 BARO_CS CS |
63 | 63 | | #PD10 FRAM_CS CS |
64 | 64 | | PE15 MAG_CS CS |
66 | 66 | | # the first CAN bus |
67 | 67 | | define HAL_USE_CAN TRUE |
68 | 68 | | define STM32_CAN_USE_CAN1 TRUE |
69 | 69 | | PD0 CAN1_RX CAN1 |
70 | 70 | | PD1 CAN1_TX CAN1 |
72 | 72 | | # reserve 256 bytes for comms between app and bootloader |
73 | 73 | | RAM_RESERVE_START 256 |
75 | 75 | | # use DNA |
76 | 76 | | define HAL_CAN_DEFAULT_NODE_ID 0 |
78 | 78 | | define CAN_APP_NODE_NAME "org.ardupilot.Pixracer-periph" |
80 | 80 | | # make bl baudrate match debug baudrate for easier debugging |
81 | 81 | | define BOOTLOADER_BAUDRATE 57600 |
83 | 83 | | # disable |
84 | 84 | | define HAL_NO_GPIO_IRQ |
85 | 85 | | define HAL_USE_EMPTY_IO TRUE |
87 | 87 | | # avoid timer and RCIN threads to save memory |
88 | 88 | | define HAL_NO_TIMER_THREAD |
89 | 89 | | define HAL_NO_RCIN_THREAD |
91 | 91 | | define HAL_USE_RTC FALSE |
92 | 92 | | define DISABLE_SERIAL_ESC_COMM TRUE |
93 | 93 | | define NO_DATAFLASH TRUE |
95 | 95 | | define DMA_RESERVE_SIZE 0 |
97 | 97 | | # ChibiOS system timer |
98 | 98 | | STM32_ST_USE_TIMER 5 |