From 46fb5adac3e6f9be263a9d38882d3ea1e0d4f429 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 12 Jul 2018 20:14:38 +0800 Subject: [PATCH] grabber: fix frequency counter formula --- artiq/firmware/libboard_artiq/grabber.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/artiq/firmware/libboard_artiq/grabber.rs b/artiq/firmware/libboard_artiq/grabber.rs index 272b44447..7c80ac81b 100644 --- a/artiq/firmware/libboard_artiq/grabber.rs +++ b/artiq/firmware/libboard_artiq/grabber.rs @@ -80,7 +80,7 @@ fn get_video_clock(g: usize) -> u32 { let freq_count = unsafe { (csr::GRABBER[g].freq_count_read)() } as u32; - 2*freq_count*(csr::CONFIG_CLOCK_FREQUENCY/1000000)/255 + 2*freq_count*(csr::CONFIG_CLOCK_FREQUENCY/1000)/(511*1000) } pub fn tick() {