Go to the documentation of this file. 1 #ifndef _BOARD_STM32V1F4_H_ 2 #define _BOARD_STM32V1F4_H_ 9 #define __CM4_REV 0x0001 10 #define __MPU_PRESENT 1 11 #define __NVIC_PRIO_BITS 4 12 #define __Vendor_SysTickConfig 0 13 #define __FPU_PRESENT 1 15 #define HSE_VALUE (8000000) 17 #define CYCLES_PER_MICROSECOND (SystemCoreClock / 1000000) 18 #define SYSTICK_RELOAD_VAL (CYCLES_PER_MICROSECOND*1000-1) 22 #define STM32_PCLK1 (CYCLES_PER_MICROSECOND*1000000/4) 23 #define STM32_PCLK2 (CYCLES_PER_MICROSECOND*1000000/2) 25 #define BOARD_BUTTON_PIN 254 37 #define BOARD_NR_USARTS 5 38 #define BOARD_USART1_TX_PIN 23 39 #define BOARD_USART1_RX_PIN 24 40 #define BOARD_USART3_TX_PIN 0 41 #define BOARD_USART3_RX_PIN 100 42 #define BOARD_USART6_TX_PIN 12 43 #define BOARD_USART6_RX_PIN 13 45 #define BOARD_DSM_USART (_USART1) 47 #define BOARD_NR_SPI 3 48 #define BOARD_SPI1_SCK_PIN 52 49 #define BOARD_SPI1_MISO_PIN 53 50 #define BOARD_SPI1_MOSI_PIN 54 51 #define BOARD_SPI2_SCK_PIN 3 // PB13 52 #define BOARD_SPI2_MISO_PIN 4 // PB14 53 #define BOARD_SPI2_MOSI_PIN 5 // PB15 54 #define BOARD_SPI3_MOSI_PIN 18 55 #define BOARD_SPI3_MISO_PIN 17 56 #define BOARD_SPI3_SCK_PIN 16 60 #define BOARD_MPU6000_CS_PIN 51 61 #define BOARD_MPU6000_DRDY_PIN 10 // PC4 64 #define BOARD_USB_SENSE 11 // PC5 67 # define BOARD_BLUE_LED_PIN 36 // BLUE 68 # define BOARD_GREEN_LED_PIN 9 // frequency select - resistor to VCC or ground 70 # define HAL_GPIO_A_LED_PIN BOARD_BLUE_LED_PIN 71 # define HAL_GPIO_B_LED_PIN BOARD_GREEN_LED_PIN 73 # define HAL_LED_ON LOW 74 # define HAL_LED_OFF HIGH 77 #define BOARD_NR_GPIO_PINS 109 85 #define BOARD_I2C_BUS_INT 1 // hardware internal I2C 87 #define BOARD_I2C_BUS_EXT 2 // external soft I2C 88 #define BOARD_I2C_BUS_SLOW 2 // slow down this bus 91 #define BOARD_SOFT_SCL 105 92 #define BOARD_SOFT_SDA 26 97 #define BOARD_COMPASS_DEFAULT HAL_COMPASS_HMC5843 99 #define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_EXT 100 #define HAL_COMPASS_HMC5843_I2C_ADDR (0x1E) 101 #define HAL_COMPASS_HMC5843_ROTATION ROTATION_NONE 104 #define BOARD_INS_DEFAULT HAL_INS_MPU60XX_SPI 105 #define BOARD_INS_ROTATION ROTATION_YAW_180 106 #define BOARD_INS_MPU60x0_NAME "mpu6000" 109 #define BOARD_STORAGE_SIZE 8192 //4096 // EEPROM size 111 #define BOARD_DATAFLASH_NAME "dataflash" 112 #define BOARD_DATAFLASH_PAGES 0x2000 // in 256-bytes pages 113 #define BOARD_DATAFLASH_ERASE_SIZE (4096)// in bytes 115 #if 1// if board's dataflash supports 4k erases then we can use it as FAT and share it via USB 116 #define BOARD_DATAFLASH_FATFS 117 #define BOARD_HAS_SDIO 118 #define USB_MASSSTORAGE 119 #define HAL_BOARD_LOG_DIRECTORY "0:" 120 #define HAL_BOARD_TERRAIN_DIRECTORY "0:/TERRAIN" 126 #define BOARD_OSD_NAME "osd" 127 #define BOARD_OSD_CS_PIN 103 128 #define BOARD_OSD_VSYNC_PIN 9 // PC3, Frequency input (pin 11) 130 #define BOARD_OWN_NAME "MiniF4_OSD" 132 # define BOARD_PUSHBUTTON_PIN 254 133 # define BOARD_USB_MUX_PIN -1 134 # define BOARD_BATTERY_VOLT_PIN 8 // Battery voltage on A0 (PC2) D8 135 # define BOARD_BATTERY_CURR_PIN 7 // Battery current on A1 (PC1) D7 136 # define BOARD_SONAR_SOURCE_ANALOG_PIN 254 138 #define BOARD_USB_DMINUS 108 141 #define BOARD_SBUS_UART 1 // can use some UART as hardware inverted input 143 #define USE_SERIAL_4WAY_BLHELI_INTERFACE 149 #define SERVO_PIN_1 46 // PB0 150 #define SERVO_PIN_2 45 // PB1 151 #define SERVO_PIN_3 50 // PA3 152 #define SERVO_PIN_4 49 // PA2 153 #define SERVO_PIN_5 48 // PA1 154 #define SERVO_PIN_6 22 // PA8 156 #define MOTOR_LAYOUT_DEFAULT 0 159 #define HAL_CONSOLE USB_Driver // console on USB 160 #define HAL_CONSOLE_PORT 0 // console on USB 174 #define BOARD_HAL_VARINFO \ 175 AP_GROUPINFO("USB_STORAGE", 30, AP_Param_Helper, _usb_storage, 0), 179 #define BOARD_HAL_PARAMS \ 180 AP_Int8 _usb_storage; 182 #define USB_MASSSTORAGE