diff options
Diffstat (limited to 'app/ntp.c')
-rw-r--r-- | app/ntp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); |