From 0548136a4c886830414fb575d9d0daa7f1a7d170 Mon Sep 17 00:00:00 2001 From: fishsoupisgood Date: Wed, 8 May 2019 23:17:01 +0100 Subject: sysclk back to 168MHz, 10Mhz -> TIM2 --- app/gps_neo8.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/gps_neo8.c') diff --git a/app/gps_neo8.c b/app/gps_neo8.c index ea5d984..9da5438 100644 --- a/app/gps_neo8.c +++ b/app/gps_neo8.c @@ -29,7 +29,7 @@ static char gps_info[60]; void exti9_5_isr (void) { - uint32_t now = SCS_DWT_CYCCNT; + uint32_t now = HW_CLOCK_REG; int v; v = !!gpio_get (PPS_PORT, PPS); @@ -266,7 +266,7 @@ ubx_recv_utc (uint8_t *ptr, unsigned len) gps_time = time_utc_to_epoch (u); - now = SCS_DWT_CYCCNT; + now = HW_CLOCK_REG; abs = abs_extend (now); gps_last_happy = make_happy (abs, 180); @@ -1040,7 +1040,7 @@ void gps_dump_almanac(void) #if 0 int gps_bs(void) { - uint32_t now = SCS_DWT_CYCCNT; + uint32_t now = HW_CLOCK_REG; uint64_t abs = abs_extend (now); EPOCH e = pll_decompose (abs); UTC u = time_epoch_to_utc (e); @@ -1103,7 +1103,7 @@ int gps_bs(void) int gps_bs(void) { - uint32_t now = SCS_DWT_CYCCNT; + uint32_t now = HW_CLOCK_REG; uint64_t abs = abs_extend (now); EPOCH e = pll_decompose (abs); UTC u = time_epoch_to_utc (e); -- cgit v1.2.3