PER Firmware
Loading...
Searching...
No Matches
rtc_sync.c File Reference

Synchronization of the RTC peripheral with the GPS UTC time. More...

#include "rtc_sync.h"
#include "common/phal/rtc.h"
#include "main.h"

Functions

 DEFINE_QUEUE (gps_time_queue, timestamped_frame_t, 1)
 
void RTC_sync_init (void)
 
void RTC_sync_thread (void)
 

Variables

RTC_timestamp_t fallback_timestamp
 
volatile uint32_t last_RTC_sync_time = 0
 
volatile bool is_RTC_sync_complete = false
 

Detailed Description

Synchronization of the RTC peripheral with the GPS UTC time.

Author
Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
Shriya Balu (balu@.nosp@m.purd.nosp@m.ue.ed.nosp@m.u)

Variable Documentation

◆ fallback_timestamp

RTC_timestamp_t fallback_timestamp
Initial value:
={
.date = {
.month_bcd = RTC_MONTH_UNKNOWN,
.weekday = RTC_WEEKDAY_UNKNOWN,
.day_bcd = 0x00,
.year_bcd = 0x00
},
.time = {
.hours_bcd = 0x00,
.minutes_bcd = 0x00,
.seconds_bcd = 0x00,
.time_format = RTC_FORMAT_24_HOUR
},
}