From e4cd004bf7e6933bc61654b339a6f885cb055353 Mon Sep 17 00:00:00 2001 From: morgan Date: Tue, 24 Sep 2024 16:04:38 +0800 Subject: [PATCH] downconn FW: add connection test packet test --- src/libboard_artiq/src/cxp_downconn.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libboard_artiq/src/cxp_downconn.rs b/src/libboard_artiq/src/cxp_downconn.rs index e03329e..150189f 100644 --- a/src/libboard_artiq/src/cxp_downconn.rs +++ b/src/libboard_artiq/src/cxp_downconn.rs @@ -37,7 +37,12 @@ pub fn loopback_testing(timer: &mut GlobalTimer, speed: CXP_SPEED) { while csr::cxp::downconn_phy_rx_ready_read() != 1 {} info!("rx ready!"); - cxp_proto::downconn_debug_send_trig_ack(); + csr::cxp::downconn_phy_tx_stb_write(1); + cxp_proto::downconn_send_test_packet(); + timer.delay_us(20000); // wait packet has arrive at rx + csr::cxp::downconn_phy_tx_stb_write(0); + + // cxp_proto::downconn_debug_send_trig_ack(); cxp_proto::downconn_debug_send(&cxp_proto::Packet::CtrlRead { addr: 0x00, @@ -54,6 +59,7 @@ pub fn loopback_testing(timer: &mut GlobalTimer, speed: CXP_SPEED) { info!("after clr trig ack = {}", csr::cxp::downconn_trig_ack_read()); info!("decoder error = {}", csr::cxp::downconn_decoder_error_read()); + info!("test error = {}", csr::cxp::downconn_test_error_read()); info!("packet type = {:#06X}", csr::cxp::downconn_packet_type_read()); // TODO: investigate how to make my packet appear