CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. This file contains the system clock configuration for STM32F30x devices, and is generated by the clock configuration tool stm32f30x_Clock_Configuration_V1.0.0.xls.
More...
|
file | pios_board.c |
| Board specific initialization for the bootloader.
|
|
file | pios_config.h |
| Board specific bootloader configuration file for PiOS.
|
|
file | board_hw_defs.c |
| Defines board specific static initializers for hardware for the PikoBLX board.
|
|
file | pios_board.h |
| Board header file for PikoBLX board.
|
|
file | pios_board.c |
| The board specific initialization routines.
|
|
file | pios_config.h |
| Board specific options that modify PiOS capabilities.
|
|
|
#define | PIOS_INCLUDE_ANNUNC |
|
#define | PIOS_INCLUDE_SPI |
|
#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 | PIOS_INCLUDE_USART |
|
#define | DEBUG_PRINTF(level,...) |
|
#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_ANNUNCIATOR_BUZZER 2 |
|
#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_FRSKY_SPORT (pios_com_frsky_sport_id) |
|
#define | PIOS_COM_OPENLOG (pios_com_openlog_logging_id) |
|
#define | PIOS_COM_STORM32BGC (pios_com_storm32bgc_id) |
|
#define | PIOS_SYSCLK 72000000 |
|
#define | PIOS_PERIPHERAL_APB1_CLOCK (PIOS_SYSCLK / 2) |
|
#define | PIOS_PERIPHERAL_APB2_CLOCK (PIOS_SYSCLK / 1) |
|
#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_RCVR_MAX_CHANNELS 12 |
|
#define | PIOS_PPM_NUM_INPUTS 12 |
|
#define | PIOS_PWM_NUM_INPUTS 10 |
|
#define | PIOS_DSM_NUM_INPUTS 12 |
|
#define | PIOS_HSUM_MAX_DEVS 2 |
|
#define | PIOS_HSUM_NUM_INPUTS 32 |
|
#define | PIOS_SBUS_NUM_INPUTS (16+2) |
|
#define | PIOS_SERVO_UPDATE_HZ 50 |
|
#define | PIOS_SERVOS_INITIAL_POSITION 0 /* dont want to start motors, have no pulse till settings loaded */ |
|
#define | PIOS_TIM_MAX_DEVS 8 |
|
#define | VREF_PLUS 3.3 |
|
#define | PIOS_DMA_MAX_CHANNELS 12 |
|
#define | PIOS_DMA_MAX_HANDLERS_PER_CHANNEL 3 |
|
#define | PIOS_DMA_CHANNELS {DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, DMA1_Channel4, DMA1_Channel5, DMA1_Channel6, DMA1_Channel7, DMA2_Channel1, DMA2_Channel2, DMA2_Channel3, DMA2_Channel4, DMA2_Channel5} |
|
#define | PIOS_USB_ENABLED 1 /* Should remove all references to this */ |
|
#define | PIOS_COM_CAN_RX_BUF_LEN 256 |
|
#define | PIOS_COM_CAN_TX_BUF_LEN 256 |
|
#define | STABILIZATION_LQG |
|
#define | PIOS_INCLUDE_DMA_CB_SUBSCRIBING_FUNCTION |
|
#define | PIOS_INCLUDE_SPI |
|
#define | PIOS_INCLUDE_MPU |
|
#define | PIOS_INCLUDE_MAVLINK |
|
#define | PIOS_INCLUDE_LIGHTTELEMETRY |
|
#define | AUTOTUNE_AVERAGING_DECIMATION 2 |
|
#define | PIOS_EVENTDISPATCHER_STACK_SIZE 1024 |
|
#define | IDLE_COUNTS_PER_SEC_AT_NO_LOAD (2175780) |
|
#define | PIOS_INCLUDE_FASTHEAP |
|
CMSIS Cortex-M4 Device Peripheral Access Layer System Source File. This file contains the system clock configuration for STM32F30x devices, and is generated by the clock configuration tool stm32f30x_Clock_Configuration_V1.0.0.xls.
- Author
- MCD Application Team
- Version
- V1.0.0
- Date
- 04-September-2012
- This file provides two functions and one global variable to be called from user application:
- SystemInit(): Setups the system clock (System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash settings), depending on the configuration made in the clock xls tool. This function is called at startup just after reset and before branch to main program. This call is made inside the "startup_stm32f30x.s" file.
- SystemCoreClock variable: Contains the core clock (HCLK), it can be used by the user application to setup the SysTick timer or configure other parameters.
- SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must be called whenever the core clock is changed during program execution.
- After each device reset the HSI (8 MHz) is used as system clock source. Then SystemInit() function is called, in "startup_stm32f30x.s" file, to configure the system clock before to branch to main program.
- If the system clock source selected by user fails to startup, the SystemInit() function will do nothing and HSI still used as system clock source. User can add some code to deal with this issue inside the SetSysClock() function.
- The default value of HSE crystal is set to 8MHz, refer to "HSE_VALUE" define in "stm32f30x.h" file. When HSE is used as system clock source, directly or through PLL, and you are using different crystal you have to adapt the HSE value to your own configuration.
5. This file configures the system clock as follows:
System Clock source | PLL (HSE)
SYSCLK(Hz) | 72000000
HCLK(Hz) | 72000000
AHB Prescaler | 1
APB2 Prescaler | 1
APB1 Prescaler | 2
HSE Frequency(Hz) | 8000000
PLLMUL | 9
PREDIV | 1
USB Clock | DISABLE
Flash Latency(WS) | 2
Prefetch Buffer | ON
=============================================================================
- Attention
© COPYRIGHT 2012 STMicroelectronics
Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.st.com/software_license_agreement_liberty_v2
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
#define AUTOTUNE_AVERAGING_DECIMATION 2 |
#define BOARD_READABLE true |
#define BOARD_WRITABLE true |
#define DEBUG_PRINTF |
( |
|
level, |
|
|
|
... |
|
) |
| |
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD (2175780) |
#define PIOS_ANNUNCIATOR_BUZZER 2 |
#define PIOS_COM_CAN_RX_BUF_LEN 256 |
#define PIOS_COM_CAN_TX_BUF_LEN 256 |
#define PIOS_DMA_CHANNELS {DMA1_Channel1, DMA1_Channel2, DMA1_Channel3, DMA1_Channel4, DMA1_Channel5, DMA1_Channel6, DMA1_Channel7, DMA2_Channel1, DMA2_Channel2, DMA2_Channel3, DMA2_Channel4, DMA2_Channel5} |
#define PIOS_DMA_MAX_CHANNELS 12 |
#define PIOS_DMA_MAX_HANDLERS_PER_CHANNEL 3 |
#define PIOS_DSM_NUM_INPUTS 12 |
#define PIOS_EVENTDISPATCHER_STACK_SIZE 1024 |
#define PIOS_HSUM_MAX_DEVS 2 |
#define PIOS_HSUM_NUM_INPUTS 32 |
#define PIOS_INCLUDE_ANNUNC |
#define PIOS_INCLUDE_COM_MSG |
#define PIOS_INCLUDE_DMA_CB_SUBSCRIBING_FUNCTION |
#define PIOS_INCLUDE_FASTHEAP |
#define PIOS_INCLUDE_FLASH |
#define PIOS_INCLUDE_FLASH_INTERNAL |
#define PIOS_INCLUDE_LIGHTTELEMETRY |
#define PIOS_INCLUDE_MAVLINK |
#define PIOS_INCLUDE_USART |
#define PIOS_INCLUDE_USB_HID |
#define PIOS_IRQ_PRIO_HIGH 5 |
#define PIOS_IRQ_PRIO_HIGHEST 4 |
#define PIOS_IRQ_PRIO_LOW 12 |
#define PIOS_IRQ_PRIO_MID 8 |
#define PIOS_LED_HEARTBEAT 0 |
#define PIOS_PPM_NUM_INPUTS 12 |
#define PIOS_PWM_NUM_INPUTS 10 |
#define PIOS_RCVR_MAX_CHANNELS 12 |
#define PIOS_SBUS_NUM_INPUTS (16+2) |
#define PIOS_SERVO_UPDATE_HZ 50 |
#define PIOS_SERVOS_INITIAL_POSITION 0 /* dont want to start motors, have no pulse till settings loaded */ |
#define PIOS_SYSCLK 72000000 |
#define PIOS_TIM_MAX_DEVS 8 |
#define PIOS_USB_ENABLED 1 /* Should remove all references to this */ |
#define PIOS_WATCHDOG_TIMEOUT 250 |
#define PIOS_WDG_REGISTER RTC_BKP_DR4 |
#define STABILIZATION_LQG |
static void hack_rx_pin |
( |
| ) |
|
|
static |
void PIOS_Board_Init |
( |
void |
| ) |
|
uintptr_t pios_com_aux_id |
uintptr_t pios_com_bridge_id |
uintptr_t pios_com_can_id |
uintptr_t pios_com_frsky_sensor_hub_id |
uintptr_t pios_com_frsky_sport_id |
uintptr_t pios_com_gps_id |
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 |
uintptr_t pios_com_openlog_logging_id |
uintptr_t pios_com_storm32bgc_id |
uintptr_t pios_com_telem_serial_id |
uintptr_t pios_com_telem_usb_id |
uintptr_t pios_com_telem_usb_id |
uintptr_t pios_com_vcp_id |
uintptr_t pios_internal_adc_id |
uintptr_t pios_uavo_settings_fs_id |
Simulation of the flash filesystem
Definition at line 53 of file pios_board.c.
Initial value:= {
.timer = TIM15,
.irq = {
.init = {
.NVIC_IRQChannel = TIM1_BRK_TIM15_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
static const TIM_TimeBaseInitTypeDef tim_1_15_16_17_time_base
Definition at line 489 of file board_hw_defs.c.
Initial value:= {
.timer = TIM16,
.irq = {
.init = {
.NVIC_IRQChannel = TIM1_UP_TIM16_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
static const TIM_TimeBaseInitTypeDef tim_1_15_16_17_time_base
Definition at line 502 of file board_hw_defs.c.
Initial value:= {
.timer = TIM17,
.irq = {
.init = {
.NVIC_IRQChannel = TIM1_TRG_COM_TIM17_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
static const TIM_TimeBaseInitTypeDef tim_1_15_16_17_time_base
Definition at line 514 of file board_hw_defs.c.
const TIM_TimeBaseInitTypeDef tim_1_15_16_17_time_base |
|
static |
Initial value:= {
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_RepetitionCounter = 0x0000,
}
#define PIOS_SERVO_UPDATE_HZ
#define PIOS_PERIPHERAL_APB2_CLOCK
Definition at line 435 of file board_hw_defs.c.
Initial value:= {
.timer = TIM1,
.irq = {
.init = {
.NVIC_IRQChannel = TIM1_CC_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
static const TIM_TimeBaseInitTypeDef tim_1_15_16_17_time_base
Definition at line 477 of file board_hw_defs.c.
const TIM_TimeBaseInitTypeDef tim_2_3_time_base |
|
static |
Initial value:= {
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_RepetitionCounter = 0x0000,
}
#define PIOS_SERVO_UPDATE_HZ
#define PIOS_PERIPHERAL_APB1_CLOCK
Definition at line 443 of file board_hw_defs.c.
Initial value:= {
.timer = TIM2,
.irq = {
.init = {
.NVIC_IRQChannel = TIM2_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
static const TIM_TimeBaseInitTypeDef tim_2_3_time_base
#define PIOS_IRQ_PRIO_MID
Definition at line 451 of file board_hw_defs.c.
Initial value:= {
.timer = TIM3,
.irq = {
.init = {
.NVIC_IRQChannel = TIM3_IRQn,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
static const TIM_TimeBaseInitTypeDef tim_2_3_time_base
#define PIOS_IRQ_PRIO_MID
Definition at line 464 of file board_hw_defs.c.