summaryrefslogtreecommitdiffstats
path: root/app/ntp.c
diff options
context:
space:
mode:
Diffstat (limited to 'app/ntp.c')
-rw-r--r--app/ntp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/ntp.c b/app/ntp.c
index f8ca357..0bdda4d 100644
--- a/app/ntp.c
+++ b/app/ntp.c
@@ -69,7 +69,7 @@ static uint64_t ntp_ts (uint64_t v)
static void ntp_rx (void *arg, struct udp_pcb *s, struct pbuf *p, struct ip_addr *src_addr, u16_t port)
{
- uint32_t now = SCS_DWT_CYCCNT;
+ uint32_t now = HW_CLOCK_REG;
struct ip_addr dst_addr = *src_addr;
ntp_packet_t pkt;
@@ -102,7 +102,7 @@ static void ntp_rx (void *arg, struct udp_pcb *s, struct pbuf *p, struct ip_addr
pkt.receive_ts = ntp_ts (abs_extend (now));
pkt.reference_ts = ntp_ts (pll_last_update);
- now = SCS_DWT_CYCCNT;
+ now = HW_CLOCK_REG;
pkt.transmit_ts = ntp_ts (abs_extend (now));
memcpy (p->payload, &pkt, sizeof (ntp_packet_t));