# hw definition file for processing by chibios_pins.py # new F412 layout MCU STM32F4xx STM32F412Rx # board ID for firmware load APJ_BOARD_ID 9 # crystal frequency OSCILLATOR_HZ 24000000 STM32_HSE_ENABLED FALSE STM32_PLLM_VALUE 16 STM32_PLLN_VALUE 384 STM32_PLLP_VALUE 4 STM32_PLLQ_VALUE 8 STM32_PLLSRC STM32_PLLSRC_HSI STM32_PREE1 STM32_PREE1_DIV2 STM32_PREE2 STM32_PREE2_DIV1 STM32_PWM_USE_TIM3 TRUE # board voltage STM32_VDD 330U # flash size FLASH_SIZE_KB 1024 # serial port for stdout STDOUT_SERIAL SD1 STDOUT_BAUDRATE 115200 # order of I2C buses I2C_ORDER I2C2 I2C1 # order of UARTs UART_ORDER USART1 USART6 USART2 PC0 MGND ADC1 PC1 PWM4_SENSE ADC1 PC2 PWM2_SENSE ADC1 PC3 PWM1_SENSE ADC1 PA0 PWM3_SENSE ADC1 # USART2 is for sonix PA2 USART2_TX USART2 PA3 USART2_RX USART2 # SPI1 is radio PA4 RADIO_CS CS PA5 SPI1_SCK SPI1 PA6 SPI1_MISO SPI1 PA7 SPI1_MOSI SPI1 PC4 RADIO_CE OUTPUT PC5 RADIO_PA_CTL OUTPUT PB0 RADIO_IRQ INPUT PB1 BATT_MON ADC1 SCALE(11) PB2 BOOT1 INPUT PB10 I2C2_SCL I2C2 PA13 JTMS-SWDIO SWD PA14 JTCK-SWCLK SWD PB9 I2C1_SDA I2C1 PB8 I2C1_SCL I2C1 PB7 LEDF OUTPUT HIGH GPIO(0) PB6 LEDR OUTPUT HIGH GPIO(1) PB5 TIM3_CH2 TIM3 PB3 I2C2_SDA I2C2 PD2 OF_MOTION INPUT # USART6 is for GPS PA11 USART6_TX USART6 PC7 USART6_RX USART6 # USART1 is for debug console PA10 USART1_RX USART1 PA9 USART1_TX USART1 PA8 OF_MOTION INPUT PC9 TIM3_CH4 TIM3 PC8 TIM3_CH3 TIM3 PC6 TIM3_CH1 TIM3 # SPI2 is optical flow PB15 SPI2_MOSI SPI2 PB14 SPI2_MISO SPI2 PB13 SPI2_SCK SPI2 PB12 FLOW_CS CS # SPI Device table SPIDEV cypress SPI1 DEVID1 RADIO_CS MODE0 2*MHZ 2*MHZ SPIDEV cc2500 SPI1 DEVID1 RADIO_CS MODE0 4*MHZ 4*MHZ SPIDEV pixartflow SPI2 DEVID2 FLOW_CS MODE3 2*MHZ 2*MHZ define HAL_CHIBIOS_ARCH_F412 1 define HAL_INS_DEFAULT HAL_INS_MPU60XX_I2C define HAL_INS_DEFAULT_ROTATION ROTATION_NONE define HAL_INS_MPU60x0_I2C_BUS 1 define HAL_INS_MPU60x0_I2C_ADDR 0x68 define HAL_GPIO_RADIO_RESET 1 define HAL_GPIO_RADIO_IRQ 2 define HAL_RCINPUT_WITH_AP_RADIO 1 define STORAGE_FLASH_PAGE 1 define HAL_STORAGE_SIZE 8192