iSensor-SPI-Buffer  1.15
Firmware for the iSensor-SPI-Buffer board to enable full throughput buffered data capture on Analog Devices IMUs
timer.h
Go to the documentation of this file.
1 
11 #ifndef INC_TIMER_H_
12 #define INC_TIMER_H_
13 
14 /* Header includes require for prototypes */
15 #include <stdint.h>
16 
17 /* Public function prototypes */
18 
19 /* @cond DOXYGEN_IGNORE */
20 void Timer_Init();
23 void Timer_Enable_PPS();
24 void Timer_Disable_PPS();
26 uint32_t Timer_Get_PPS_Timestamp();
27 void Timer_Sleep_Microseconds(uint32_t microseconds);
29 /* @endcond */
30 
32 #define PPS_INT_MASK GPIO_PIN_8|GPIO_PIN_7|GPIO_PIN_4
33 
34 /* Public variables exported from module */
35 extern uint32_t g_PPSInterruptMask;
36 
37 #endif /* INC_TIMER_H_ */
ConfigurePPSPins
static void ConfigurePPSPins(uint32_t enable)
Configure PPS timer based on DIO_INPUT_CONFIG value.
Definition: timer.c:260
Timer_Clear_Microsecond_Timer
void Timer_Clear_Microsecond_Timer()
Reset TIM2 counter to 0.
Definition: timer.c:123
reg.h
Header file for iSensor-SPI-Buffer register interfacing module.
htim2
static TIM_HandleTypeDef htim2
Definition: timer.c:26
g_PPSInterruptMask
uint32_t g_PPSInterruptMask
Definition: timer.c:23
Timer_Init
void Timer_Init()
Initialize all timers for operation.
Definition: timer.c:47
g_PPSInterruptMask
uint32_t g_PPSInterruptMask
Definition: timer.c:23
VECT_TAB_OFFSET
#define VECT_TAB_OFFSET
Definition: system_stm32f3xx.c:100
dio.h
Header file for iSensor-SPI-Buffer DIO interfacing module.
g_pinConfig
volatile DIOConfig g_pinConfig
Definition: dio.c:20
InitTIM8
static void InitTIM8()
Enables TIM8 as general 1MHz timer.
Definition: timer.c:232
__attribute__
volatile uint16_t g_regs[NUM_REG_PAGES *REG_PER_PAGE] __attribute__((aligned(32)))
Timer_Increment_PPS_Time
void Timer_Increment_PPS_Time()
Increment PPS timestamp by 1.
Definition: timer.c:170
_sbrk
caddr_t _sbrk(int incr)
Definition: sysmem.c:38
PPS_MaxTickCount
static uint32_t PPS_MaxTickCount
Definition: timer.c:35
Timer_Get_PPS_Timestamp
uint32_t Timer_Get_PPS_Timestamp()
Gets the current 32-bit value from PPS timestamp registers.
Definition: timer.c:113
SystemInit
void SystemInit(void)
Setup the microcontroller system.
Definition: system_stm32f3xx.c:151
timer.h
Header file for iSensor-SPI-Buffer timer module.
htim8
static TIM_HandleTypeDef htim8
Definition: timer.c:29
Timer_Disable_PPS
void Timer_Disable_PPS()
Disable PPS timer functionality.
Definition: timer.c:155
InitTIM2
static void InitTIM2(uint32_t timerfreq)
Enables IMU sample timestamp timer.
Definition: timer.c:208
Timer_Enable_PPS
void Timer_Enable_PPS()
Enable PPS input for time stamp synchronization (improved long term stability over 20ppm crystal).
Definition: timer.c:144
DWT_Init
static void DWT_Init()
Init DWT peripheral.
Definition: timer.c:460
HSE_VALUE
#define HSE_VALUE
Definition: system_stm32f3xx.c:88
DIO_Update_Output_Config
void DIO_Update_Output_Config()
Validates DIO_OUTPUT_CONFIG settings and applies to GPIO.
Definition: dio.c:291
SystemCoreClockUpdate
void SystemCoreClockUpdate(void)
Update SystemCoreClock variable according to Clock Register Values. The SystemCoreClock variable cont...
Definition: system_stm32f3xx.c:201
main.h
Header file for iSensor-SPI-Buffer main.
DIOConfig::ppsPin
uint32_t ppsPin
Definition: dio.h:33
Timer_Check_PPS_Unlock
void Timer_Check_PPS_Unlock()
Check if the PPS signal is unlocked (greater than 1100ms since last PPS strobe)
Definition: timer.c:64
PPS_TickCount
static uint32_t PPS_TickCount
Definition: timer.c:32
HSI_VALUE
#define HSI_VALUE
Definition: system_stm32f3xx.c:93
PPS_INT_MASK
#define PPS_INT_MASK
Definition: timer.h:32
Timer_Get_Microsecond_Timestamp
uint32_t Timer_Get_Microsecond_Timestamp()
Gets the current 32-bit value from the IMU sample timestamp timer.
Definition: timer.c:103
Timer_Sleep_Microseconds
void Timer_Sleep_Microseconds(uint32_t microseconds)
Blocking sleep function call.
Definition: timer.c:89