Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
sys_time_arch.c File Reference

STM32 timing functions. More...

#include "mcu_periph/sys_time.h"
#include "mcu_periph/sys_time_arch.h"
#include "libopencm3/cm3/systick.h"
+ Include dependency graph for sys_time_arch.c:

Go to the source code of this file.

Macros

#define USE_OCM3_SYSTICK_INIT   1
 

Functions

void sys_tick_handler (void)
 
void sys_time_arch_init (void)
 Initialize SysTick.
 
void sys_time_usleep (uint32_t us)
 Busy wait in microseconds.
 
void sys_time_msleep (uint32_t ms)
 Sleep.
 

Detailed Description

STM32 timing functions.

Definition in file sys_time_arch.c.

Macro Definition Documentation

◆ USE_OCM3_SYSTICK_INIT

#define USE_OCM3_SYSTICK_INIT   1

Definition at line 40 of file sys_time_arch.c.

Function Documentation

◆ sys_tick_handler()

◆ sys_time_arch_init()

void sys_time_arch_init ( void  )

Initialize SysTick.

Generate SysTick interrupt every sys_time.resolution_cpu_ticks

Definition at line 48 of file sys_time_arch.c.

References AHB_CLK, sys_time::cpu_ticks_per_sec, foo, sys_time::resolution, and sys_time::resolution_cpu_ticks.

◆ sys_time_msleep()

void sys_time_msleep ( uint32_t  ms)

Sleep.

Parameters
msmilliseconds

Definition at line 134 of file sys_time_arch.c.

References foo, and sys_time_usleep().

+ Here is the call graph for this function:

◆ sys_time_usleep()

void sys_time_usleep ( uint32_t  us)

Busy wait in microseconds.

Sleep.

max value is limited by the max number of cycle i.e 2^32 * usec_of_cpu_ticks(systick_get_reload())

Definition at line 106 of file sys_time_arch.c.

References cpu_ticks_of_usec(), foo, and usec_of_cpu_ticks().

+ Here is the call graph for this function: