STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
board_time.c File Reference
#include "board_time.h"
#include "main.h"
Include dependency graph for board_time.c:

Go to the source code of this file.

Functions

static uint32_t tim2_kernel_hz (void)
bool board_time_start (void)
uint32_t board_time_us (void)
board_pps_t board_time_last_pps (void)
void HAL_TIM_IC_CaptureCallback (TIM_HandleTypeDef *htim)

Variables

TIM_HandleTypeDef htim2
static volatile uint32_t pps_edge_us
static volatile uint32_t pps_count

Function Documentation

◆ board_time_last_pps()

board_pps_t board_time_last_pps ( void )

Definition at line 38 of file board_time.c.

References board_pps_t::count, count(), board_pps_t::edge_us, pps_count, and pps_edge_us.

Referenced by gnss_task().

◆ board_time_start()

bool board_time_start ( void )

Definition at line 27 of file board_time.c.

References HAL_OK, HAL_TIM_IC_Start_IT(), htim2, tim2_kernel_hz(), and TIM_CHANNEL_4.

Referenced by board_bringup_power_up().

◆ board_time_us()

uint32_t board_time_us ( void )

Definition at line 34 of file board_time.c.

References htim2.

Referenced by gnss_task(), HAL_GPIO_EXTI_Callback(), measure_lsi(), and sensors_task().

◆ tim2_kernel_hz()

Variable Documentation

◆ htim2

TIM_HandleTypeDef htim2
extern

Definition at line 62 of file main.c.

Referenced by board_time_start(), board_time_us(), MX_TIM2_Init(), and TIM2_IRQHandler().

◆ pps_count

volatile uint32_t pps_count
static

Definition at line 8 of file board_time.c.

Referenced by board_time_last_pps(), and HAL_TIM_IC_CaptureCallback().

◆ pps_edge_us

volatile uint32_t pps_edge_us
static

Definition at line 7 of file board_time.c.

Referenced by board_time_last_pps(), and HAL_TIM_IC_CaptureCallback().