From d46c5434ded8cbf697ea90441c8a5cc922665210 Mon Sep 17 00:00:00 2001 From: morgan Date: Mon, 7 Oct 2024 16:42:46 +0800 Subject: [PATCH] downconn fw: add delay between rx test packet downconn fw: change data size --- src/libboard_artiq/src/cxp_downconn.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libboard_artiq/src/cxp_downconn.rs b/src/libboard_artiq/src/cxp_downconn.rs index da16fd0..c6c165a 100644 --- a/src/libboard_artiq/src/cxp_downconn.rs +++ b/src/libboard_artiq/src/cxp_downconn.rs @@ -44,8 +44,7 @@ pub fn loopback_testing(channel: usize, timer: &mut GlobalTimer, speed: CXP_SPEE cxp_proto::downconn_debug_send_trig_ack(channel); const SEND_TIMES: usize = 4; - const MAX_PACKET: usize = 128; - const DATA_MAXSIZE: usize = /*max size*/MAX_PACKET - /*Tag*/4 - /*Op code & length*/4 - /*addr*/4 - /*CRC*/4 ; + const DATA_MAXSIZE: usize = 48; let mut data_slice: [u8; DATA_MAXSIZE] = [0; DATA_MAXSIZE]; for i in 0..SEND_TIMES { @@ -60,6 +59,7 @@ pub fn loopback_testing(channel: usize, timer: &mut GlobalTimer, speed: CXP_SPEE }, ) .expect("loopback gtx tx error"); + timer.delay_us(10); } timer.delay_us(1000); // wait packet has arrive at RX async fifo