Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ppm_arch.h File Reference

STM32 ppm decoder. More...

+ Include dependency graph for ppm_arch.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define RC_PPM_TICKS_PER_USEC   6
 The ppm counter is set-up to have 1/6 us resolution. More...
 
#define RC_PPM_TICKS_OF_USEC(_v)   ((_v)*RC_PPM_TICKS_PER_USEC)
 
#define RC_PPM_SIGNED_TICKS_OF_USEC(_v)   (int32_t)((_v)*RC_PPM_TICKS_PER_USEC)
 
#define USEC_OF_RC_PPM_TICKS(_v)   ((_v)/RC_PPM_TICKS_PER_USEC)
 
#define PPM_NB_CHANNEL   RADIO_CONTROL_NB_CHANNEL
 

Detailed Description

STM32 ppm decoder.

Definition in file ppm_arch.h.

Macro Definition Documentation

#define PPM_NB_CHANNEL   RADIO_CONTROL_NB_CHANNEL

Definition at line 52 of file ppm_arch.h.

#define RC_PPM_SIGNED_TICKS_OF_USEC (   _v)    (int32_t)((_v)*RC_PPM_TICKS_PER_USEC)

Definition at line 49 of file ppm_arch.h.

#define RC_PPM_TICKS_OF_USEC (   _v)    ((_v)*RC_PPM_TICKS_PER_USEC)

Definition at line 48 of file ppm_arch.h.

#define RC_PPM_TICKS_PER_USEC   6

The ppm counter is set-up to have 1/6 us resolution.

The timer clock frequency (before prescaling): STM32F1: TIM1 -> APB2 = HCLK = 72MHz TIM2 -> 2 * APB1 = 2 * 36MHz = 72MHz STM32F4: TIM1 -> 2 * APB2 = 2 * 84MHz = 168MHz TIM2 -> 2 * APB1 = 2 * 42MHz = 84MHz

Definition at line 46 of file ppm_arch.h.

Referenced by ppm_arch_init().

#define USEC_OF_RC_PPM_TICKS (   _v)    ((_v)/RC_PPM_TICKS_PER_USEC)

Definition at line 50 of file ppm_arch.h.