From 2213e7ffac275c724d13f093cbeba7a581b2aa4b Mon Sep 17 00:00:00 2001 From: occheung Date: Tue, 7 Sep 2021 13:16:00 +0800 Subject: [PATCH] ksupp/rtio/exception: fix timestamp --- artiq/firmware/ksupport/rtio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/firmware/ksupport/rtio.rs b/artiq/firmware/ksupport/rtio.rs index a83a45ec1..8736e33f5 100644 --- a/artiq/firmware/ksupport/rtio.rs +++ b/artiq/firmware/ksupport/rtio.rs @@ -59,7 +59,7 @@ mod imp { #[inline(never)] unsafe fn process_exceptional_status(channel: i32, status: u8) { - let timestamp = *(csr::rtio::NOW_HI_ADDR as *const i64); + let timestamp = ((csr::rtio::now_hi_read() as i64) << 32) | (csr::rtio::now_lo_read() as i64); if status & RTIO_O_STATUS_WAIT != 0 { while csr::rtio::o_status_read() & RTIO_O_STATUS_WAIT != 0 {} }