Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "std.h"
#include <BOARD_CONFIG>
#include <libopencm3/stm32/gpio.h>
#include <libopencm3/stm32/rcc.h>
#include <libopencm3/stm32/timer.h>
#include <libopencm3/cm3/nvic.h>
#include "mcu_arch.h"
Go to the source code of this file.
Macros | |
#define | ONE_MHZ_CLK 1000000 |
#define | PWM_BASE_FREQ ONE_MHZ_CLK |
#define | SERVO_HZ 40 |
Default servo update rate in Hz. More... | |
#define | TIM1_SERVO_HZ SERVO_HZ |
#define | TIM2_SERVO_HZ SERVO_HZ |
#define | TIM3_SERVO_HZ SERVO_HZ |
#define | TIM4_SERVO_HZ SERVO_HZ |
#define | TIM5_SERVO_HZ SERVO_HZ |
#define | TIM8_SERVO_HZ SERVO_HZ |
#define | TIM9_SERVO_HZ SERVO_HZ |
#define | TIM12_SERVO_HZ SERVO_HZ |
Functions | |
void | actuators_pwm_arch_channel_init (uint32_t timer_peripheral, enum tim_oc_id oc_id) |
Set PWM channel configuration. More... | |
void | set_servo_timer (uint32_t timer, uint32_t period, uint8_t channels_mask) |
Set Timer configuration. More... | |
STM32 PWM and dualPWM servos shared functions.
Definition in file actuators_shared_arch.h.
#define ONE_MHZ_CLK 1000000 |
Definition at line 39 of file actuators_shared_arch.h.
#define PWM_BASE_FREQ ONE_MHZ_CLK |
Definition at line 43 of file actuators_shared_arch.h.
#define SERVO_HZ 40 |
Default servo update rate in Hz.
Definition at line 49 of file actuators_shared_arch.h.
#define TIM12_SERVO_HZ SERVO_HZ |
Definition at line 75 of file actuators_shared_arch.h.
#define TIM1_SERVO_HZ SERVO_HZ |
Definition at line 54 of file actuators_shared_arch.h.
#define TIM2_SERVO_HZ SERVO_HZ |
Definition at line 57 of file actuators_shared_arch.h.
#define TIM3_SERVO_HZ SERVO_HZ |
Definition at line 60 of file actuators_shared_arch.h.
#define TIM4_SERVO_HZ SERVO_HZ |
Definition at line 63 of file actuators_shared_arch.h.
#define TIM5_SERVO_HZ SERVO_HZ |
Definition at line 66 of file actuators_shared_arch.h.
#define TIM8_SERVO_HZ SERVO_HZ |
Definition at line 69 of file actuators_shared_arch.h.
#define TIM9_SERVO_HZ SERVO_HZ |
Definition at line 72 of file actuators_shared_arch.h.
void actuators_pwm_arch_channel_init | ( | uint32_t | timer_peripheral, |
enum tim_oc_id | oc_id | ||
) |
Set PWM channel configuration.
Definition at line 35 of file actuators_shared_arch.c.
Referenced by set_servo_timer().
Set Timer configuration.
[in] | timer | Timer register address base |
[in] | freq | PWM frequency in Hz (1 / auto-reload period) |
[in] | channels_mask | output compare channels to enable |
Definition at line 59 of file actuators_shared_arch.c.
References actuators_pwm_arch_channel_init(), PWM_BASE_FREQ, and timer_get_frequency().
Referenced by actuators_dualpwm_arch_init(), and actuators_pwm_arch_init().