dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Bootloader for PlayUAVOSD board. More...

Modules

 CMSIS
 
 USB_OTG_DRIVER
 

Files

file  cmsis_system.c
 CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. This file contains the system clock configuration for STM32F4xx devices, and is generated by the clock configuration tool stm32f4xx_Clock_Configuration_V1.0.0.xls.
 
file  usb_conf.h
 General low level driver configuration.
 

Macros

#define PIOS_INCLUDE_DELAY
 
#define PIOS_INCLUDE_IRQ
 
#define PIOS_INCLUDE_ANNUNC
 
#define PIOS_INCLUDE_SYS
 
#define PIOS_INCLUDE_IAP
 
#define PIOS_INCLUDE_USB
 
#define PIOS_INCLUDE_USB_HID
 
#define PIOS_INCLUDE_COM_MSG
 
#define PIOS_INCLUDE_FLASH
 
#define PIOS_INCLUDE_FLASH_INTERNAL
 
#define BOARD_READABLE   true
 
#define BOARD_WRITABLE   true
 
#define MAX_DEL_RETRYS   3
 
#define PIOS_LED_HEARTBEAT   0
 
#define PIOS_LED_ALARM   1
 
#define PIOS_WATCHDOG_TIMEOUT   250
 
#define PIOS_WDG_REGISTER   RTC_BKP_DR4
 
#define PIOS_COM_GPS   (pios_com_gps_id)
 
#define PIOS_COM_TELEM_USB   (pios_com_telem_usb_id)
 
#define PIOS_COM_BRIDGE   (pios_com_bridge_id)
 
#define PIOS_COM_VCP   (pios_com_vcp_id)
 
#define PIOS_COM_MAVLINK   (pios_com_mavlink_id)
 
#define PIOS_COM_HOTT   (pios_com_hott_id)
 
#define PIOS_COM_FRSKY_SENSOR_HUB   (pios_com_frsky_sensor_hub_id)
 
#define PIOS_COM_LIGHTTELEMETRY   (pios_com_lighttelemetry_id)
 
#define PIOS_COM_DEBUG   (pios_com_debug_id)
 
#define DEBUG_LEVEL   0
 
#define DEBUG_PRINTF(level,...)   {if(level <= DEBUG_LEVEL && pios_com_debug_id > 0) { PIOS_COM_SendFormattedStringNonBlocking(pios_com_debug_id, __VA_ARGS__); }}
 
#define PIOS_SYSCLK   168000000
 
#define PIOS_PERIPHERAL_APB1_CLOCK   (PIOS_SYSCLK / 4)
 
#define PIOS_PERIPHERAL_APB2_CLOCK   (PIOS_SYSCLK / 2)
 
#define PIOS_IRQ_PRIO_LOW   12
 
#define PIOS_IRQ_PRIO_MID   8
 
#define PIOS_IRQ_PRIO_HIGH   5
 
#define PIOS_IRQ_PRIO_HIGHEST   4
 
#define PIOS_TIM_MAX_DEVS   6
 
#define PIOS_USB_ENABLED   1 /* Should remove all references to this */
 
#define PIOS_INCLUDE_CHIBIOS
 
#define PIOS_INCLUDE_BL_HELPER
 
#define WDG_STATS_DIAGNOSTICS
 
#define PIOS_INCLUDE_ANNUNC
 
#define PIOS_INCLUDE_IAP
 
#define PIOS_INCLUDE_TIM
 
#define PIOS_INCLUDE_SYS
 
#define PIOS_INCLUDE_USART
 
#define PIOS_INCLUDE_USB
 
#define PIOS_INCLUDE_USB_HID
 
#define PIOS_INCLUDE_USB_CDC
 
#define PIOS_INCLUDE_EXTI
 
#define PIOS_INCLUDE_RTC
 
#define PIOS_INCLUDE_WDG
 
#define PIOS_INCLUDE_SPI
 
#define PIOS_INCLUDE_FASTHEAP
 
#define PIOS_INCLUDE_TBSVTXCONFIG
 
#define PIOS_INCLUDE_COM
 
#define PIOS_INCLUDE_MSP_BRIDGE
 
#define PIOS_INCLUDE_GPS
 
#define PIOS_INCLUDE_GPS_NMEA_PARSER
 
#define PIOS_INCLUDE_GPS_UBX_PARSER
 
#define PIOS_INCLUDE_FLASH
 
#define PIOS_INCLUDE_LOGFS_SETTINGS
 
#define PIOS_INCLUDE_FLASH_INTERNAL
 
#define PIOS_VIDEO_TIM4_COUNTER
 
#define PIOS_INCLUDE_VIDEO
 
#define PIOS_VIDEO_SPLITBUFFER
 
#define MODULE_FLIGHTSTATS_BUILTIN
 
#define PIOS_INCLUDE_DEBUG_CONSOLE
 
#define PIOS_INCLUDE_MAX7456
 
#define PIOS_OMIT_TIM2IRQ
 
#define PIOS_INCLUDE_INITCALL   /* Include init call structures */
 
#define HEAP_LIMIT_WARNING   1000
 
#define HEAP_LIMIT_CRITICAL   500
 
#define IRQSTACK_LIMIT_WARNING   150
 
#define IRQSTACK_LIMIT_CRITICAL   80
 
#define CPULOAD_LIMIT_WARNING   80
 
#define CPULOAD_LIMIT_CRITICAL   95
 
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD   (9873737)
 
#define oplogo_width   144
 
#define oplogo_height   144
 
#define level_width   144
 
#define level_height   129
 
#define level_mask_width   144
 
#define level_mask_height   129
 
#define llama_width   240
 
#define llama_height   260
 
#define llama_mask_width   240
 
#define llama_mask_height   260
 

Functions

void PIOS_Board_Init ()
 
static void PIOS_BOARD_Init_Uavos (void)
 

Variables

uintptr_t pios_com_telem_usb_id
 
static const struct pios_usart_cfg pios_usart_main_cfg
 
static const
TIM_TimeBaseInitTypeDef 
tim_apb1_time_base
 
static const
TIM_TimeBaseInitTypeDef 
tim_apb2_time_base
 
static const struct
pios_tim_clock_cfg 
tim_3_cfg
 
static const struct
pios_tim_clock_cfg 
tim_5_cfg
 
static const struct
pios_tim_clock_cfg 
tim_8_cfg
 
static const struct
pios_tim_clock_cfg 
tim_9_cfg
 
static const struct
pios_tim_clock_cfg 
tim_12_cfg
 
uintptr_t pios_com_telem_serial_id
 
uintptr_t pios_com_gps_id
 
uintptr_t pios_com_telem_usb_id
 
uintptr_t pios_com_bridge_id
 
uintptr_t pios_com_vcp_id
 
uintptr_t pios_com_mavlink_id
 
uintptr_t pios_com_hott_id
 
uintptr_t pios_com_frsky_sensor_hub_id
 
uintptr_t pios_com_lighttelemetry_id
 
uintptr_t pios_com_debug_id
 
uintptr_t pios_com_frsky_sport_id
 
uintptr_t pios_com_openlog_logging_id
 
uintptr_t pios_uavo_settings_fs_id
 
static const unsigned short oplogo_bits []
 
static const unsigned short oplogo_mask_bits []
 
static const unsigned short level_bits []
 
static const unsigned short level_mask_bits []
 
static const unsigned short llama_bits []
 
static const unsigned short llama_mask_bits []
 

Detailed Description

Bootloader for PlayUAVOSD board.

Firmware for PlayUAVOSD board.

Board support for PlayUAVOSD board.

Macro Definition Documentation

#define BOARD_READABLE   true

Definition at line 69 of file pios_board.h.

#define BOARD_WRITABLE   true

Definition at line 70 of file pios_board.h.

#define CPULOAD_LIMIT_CRITICAL   95

Definition at line 85 of file pios_config.h.

#define CPULOAD_LIMIT_WARNING   80

Definition at line 84 of file pios_config.h.

#define DEBUG_LEVEL   0

Definition at line 114 of file pios_board.h.

#define DEBUG_PRINTF (   level,
  ... 
)    {if(level <= DEBUG_LEVEL && pios_com_debug_id > 0) { PIOS_COM_SendFormattedStringNonBlocking(pios_com_debug_id, __VA_ARGS__); }}

Definition at line 115 of file pios_board.h.

#define HEAP_LIMIT_CRITICAL   500

Definition at line 81 of file pios_config.h.

#define HEAP_LIMIT_WARNING   1000

Definition at line 80 of file pios_config.h.

#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD   (9873737)

Definition at line 98 of file pios_config.h.

#define IRQSTACK_LIMIT_CRITICAL   80

Definition at line 83 of file pios_config.h.

#define IRQSTACK_LIMIT_WARNING   150

Definition at line 82 of file pios_config.h.

#define level_height   129

Definition at line 332 of file splash.h.

#define level_mask_height   129

Definition at line 466 of file splash.h.

#define level_mask_width   144

Definition at line 465 of file splash.h.

#define level_width   144

Definition at line 331 of file splash.h.

#define llama_height   260

Definition at line 600 of file splash.h.

#define llama_mask_height   260

Definition at line 1039 of file splash.h.

#define llama_mask_width   240

Definition at line 1038 of file splash.h.

#define llama_width   240

Definition at line 599 of file splash.h.

#define MAX_DEL_RETRYS   3

Definition at line 71 of file pios_board.h.

#define MODULE_FLIGHTSTATS_BUILTIN

Definition at line 71 of file pios_config.h.

#define oplogo_height   144

Definition at line 35 of file splash.h.

#define oplogo_width   144

Definition at line 34 of file splash.h.

#define PIOS_COM_BRIDGE   (pios_com_bridge_id)

Definition at line 106 of file pios_board.h.

#define PIOS_COM_DEBUG   (pios_com_debug_id)

Definition at line 112 of file pios_board.h.

#define PIOS_COM_FRSKY_SENSOR_HUB   (pios_com_frsky_sensor_hub_id)

Definition at line 110 of file pios_board.h.

#define PIOS_COM_GPS   (pios_com_gps_id)

Definition at line 104 of file pios_board.h.

#define PIOS_COM_HOTT   (pios_com_hott_id)

Definition at line 109 of file pios_board.h.

#define PIOS_COM_LIGHTTELEMETRY   (pios_com_lighttelemetry_id)

Definition at line 111 of file pios_board.h.

#define PIOS_COM_MAVLINK   (pios_com_mavlink_id)

Definition at line 108 of file pios_board.h.

#define PIOS_COM_TELEM_USB   (pios_com_telem_usb_id)

Definition at line 105 of file pios_board.h.

#define PIOS_COM_VCP   (pios_com_vcp_id)

Definition at line 107 of file pios_board.h.

#define PIOS_INCLUDE_ANNUNC

Definition at line 36 of file pios_config.h.

#define PIOS_INCLUDE_ANNUNC

Definition at line 40 of file pios_config.h.

#define PIOS_INCLUDE_BL_HELPER

Definition at line 36 of file pios_config.h.

#define PIOS_INCLUDE_CHIBIOS

Definition at line 35 of file pios_config.h.

#define PIOS_INCLUDE_COM

Definition at line 56 of file pios_config.h.

#define PIOS_INCLUDE_COM_MSG

Definition at line 41 of file pios_config.h.

#define PIOS_INCLUDE_DEBUG_CONSOLE

Definition at line 72 of file pios_config.h.

#define PIOS_INCLUDE_DELAY

Definition at line 34 of file pios_config.h.

#define PIOS_INCLUDE_EXTI

Definition at line 48 of file pios_config.h.

#define PIOS_INCLUDE_FASTHEAP

Definition at line 52 of file pios_config.h.

#define PIOS_INCLUDE_FLASH

Definition at line 42 of file pios_config.h.

#define PIOS_INCLUDE_FLASH

Definition at line 63 of file pios_config.h.

#define PIOS_INCLUDE_FLASH_INTERNAL

Definition at line 43 of file pios_config.h.

#define PIOS_INCLUDE_FLASH_INTERNAL

Definition at line 65 of file pios_config.h.

#define PIOS_INCLUDE_GPS

Definition at line 59 of file pios_config.h.

#define PIOS_INCLUDE_GPS_NMEA_PARSER

Definition at line 60 of file pios_config.h.

#define PIOS_INCLUDE_GPS_UBX_PARSER

Definition at line 61 of file pios_config.h.

#define PIOS_INCLUDE_IAP

Definition at line 38 of file pios_config.h.

#define PIOS_INCLUDE_IAP

Definition at line 41 of file pios_config.h.

#define PIOS_INCLUDE_INITCALL   /* Include init call structures */

Definition at line 77 of file pios_config.h.

#define PIOS_INCLUDE_IRQ

Definition at line 35 of file pios_config.h.

#define PIOS_INCLUDE_LOGFS_SETTINGS

Definition at line 64 of file pios_config.h.

#define PIOS_INCLUDE_MAX7456

Definition at line 73 of file pios_config.h.

#define PIOS_INCLUDE_MSP_BRIDGE

Definition at line 57 of file pios_config.h.

#define PIOS_INCLUDE_RTC

Definition at line 49 of file pios_config.h.

#define PIOS_INCLUDE_SPI

Definition at line 51 of file pios_config.h.

#define PIOS_INCLUDE_SYS

Definition at line 37 of file pios_config.h.

#define PIOS_INCLUDE_SYS

Definition at line 43 of file pios_config.h.

#define PIOS_INCLUDE_TBSVTXCONFIG

Definition at line 53 of file pios_config.h.

#define PIOS_INCLUDE_TIM

Definition at line 42 of file pios_config.h.

#define PIOS_INCLUDE_USART

Definition at line 44 of file pios_config.h.

#define PIOS_INCLUDE_USB

Definition at line 39 of file pios_config.h.

#define PIOS_INCLUDE_USB

Definition at line 45 of file pios_config.h.

#define PIOS_INCLUDE_USB_CDC

Definition at line 47 of file pios_config.h.

#define PIOS_INCLUDE_USB_HID

Definition at line 40 of file pios_config.h.

#define PIOS_INCLUDE_USB_HID

Definition at line 46 of file pios_config.h.

#define PIOS_INCLUDE_VIDEO

Definition at line 69 of file pios_config.h.

#define PIOS_INCLUDE_WDG

Definition at line 50 of file pios_config.h.

#define PIOS_IRQ_PRIO_HIGH   5

Definition at line 146 of file pios_board.h.

#define PIOS_IRQ_PRIO_HIGHEST   4

Definition at line 147 of file pios_board.h.

#define PIOS_IRQ_PRIO_LOW   12

Definition at line 144 of file pios_board.h.

#define PIOS_IRQ_PRIO_MID   8

Definition at line 145 of file pios_board.h.

#define PIOS_LED_ALARM   1

Definition at line 78 of file pios_board.h.

#define PIOS_LED_HEARTBEAT   0

Definition at line 77 of file pios_board.h.

#define PIOS_OMIT_TIM2IRQ

Definition at line 74 of file pios_config.h.

#define PIOS_PERIPHERAL_APB1_CLOCK   (PIOS_SYSCLK / 4)

Definition at line 128 of file pios_board.h.

#define PIOS_PERIPHERAL_APB2_CLOCK   (PIOS_SYSCLK / 2)

Definition at line 138 of file pios_board.h.

#define PIOS_SYSCLK   168000000

Definition at line 117 of file pios_board.h.

#define PIOS_TIM_MAX_DEVS   6

Definition at line 152 of file pios_board.h.

#define PIOS_USB_ENABLED   1 /* Should remove all references to this */

Definition at line 157 of file pios_board.h.

#define PIOS_VIDEO_SPLITBUFFER

Definition at line 70 of file pios_config.h.

#define PIOS_VIDEO_TIM4_COUNTER

Definition at line 68 of file pios_config.h.

#define PIOS_WATCHDOG_TIMEOUT   250

Definition at line 83 of file pios_board.h.

#define PIOS_WDG_REGISTER   RTC_BKP_DR4

Definition at line 84 of file pios_board.h.

#define WDG_STATS_DIAGNOSTICS

Definition at line 39 of file pios_config.h.

Function Documentation

void PIOS_Board_Init ( void  )

Initialise PWM Output for black/white level setting PIOS_Board_Init() initializes all the core subsystems on this specific hardware called from System/openpilot.c

Definition at line 39 of file pios_board.c.

static void PIOS_BOARD_Init_Uavos ( void  )
static

Initialise UAVOs required by OSD module so board can boot

Todo:
something nicer about this

Definition at line 330 of file pios_board.c.

Variable Documentation

const unsigned short level_bits[]
static

Definition at line 333 of file splash.h.

const unsigned short level_mask_bits[]
static

Definition at line 467 of file splash.h.

const unsigned short llama_bits[]
static

Definition at line 601 of file splash.h.

const unsigned short llama_mask_bits[]
static

Definition at line 1040 of file splash.h.

const unsigned short oplogo_bits[]
static

Definition at line 36 of file splash.h.

const unsigned short oplogo_mask_bits[]
static

Definition at line 183 of file splash.h.

uintptr_t pios_com_bridge_id

Definition at line 81 of file pios_hal.c.

uintptr_t pios_com_debug_id

Definition at line 76 of file pios_board.c.

uintptr_t pios_com_frsky_sensor_hub_id
uintptr_t pios_com_frsky_sport_id
uintptr_t pios_com_gps_id

Definition at line 80 of file pios_hal.c.

uintptr_t pios_com_hott_id
uintptr_t pios_com_lighttelemetry_id
uintptr_t pios_com_mavlink_id
uintptr_t pios_com_openlog_logging_id

Definition at line 49 of file pios_board.c.

uintptr_t pios_com_telem_serial_id

Definition at line 127 of file pios_hal.c.

uintptr_t pios_com_telem_usb_id

Definition at line 37 of file pios_board.c.

uintptr_t pios_com_telem_usb_id

Definition at line 42 of file pios_board.c.

uintptr_t pios_com_vcp_id
uintptr_t pios_uavo_settings_fs_id
Todo:
something nicer about these

Definition at line 60 of file pios_board.c.

const struct pios_usart_cfg pios_usart_main_cfg
static

Definition at line 177 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_12_cfg
static
Initial value:
= {
.timer = TIM12,
.time_base_init = &tim_apb1_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM8_BRK_TIM12_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170
static const TIM_TimeBaseInitTypeDef tim_apb1_time_base

Definition at line 322 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_3_cfg
static
Initial value:
= {
.timer = TIM3,
.time_base_init = &tim_apb1_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM3_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170
static const TIM_TimeBaseInitTypeDef tim_apb1_time_base

Definition at line 270 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_5_cfg
static
Initial value:
= {
.timer = TIM5,
.time_base_init = &tim_apb1_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM5_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170
static const TIM_TimeBaseInitTypeDef tim_apb1_time_base

Definition at line 283 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_8_cfg
static
Initial value:
= {
.timer = TIM8,
.time_base_init = &tim_apb2_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM8_CC_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
static const TIM_TimeBaseInitTypeDef tim_apb2_time_base
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170

Definition at line 296 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_9_cfg
static
Initial value:
= {
.timer = TIM9,
.time_base_init = &tim_apb2_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM1_BRK_TIM9_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
static const TIM_TimeBaseInitTypeDef tim_apb2_time_base
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170

Definition at line 309 of file board_hw_defs.c.

const TIM_TimeBaseInitTypeDef tim_apb1_time_base
static
Initial value:
= {
.TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_Period = 0xFFFF,
.TIM_RepetitionCounter = 0x0000,
}

Definition at line 250 of file board_hw_defs.c.

const TIM_TimeBaseInitTypeDef tim_apb2_time_base
static
Initial value:
= {
.TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 1000000) - 1,
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_Period = 0xFFFF,
.TIM_RepetitionCounter = 0x0000,
}

Definition at line 261 of file board_hw_defs.c.