1
0
Fork 0

downconn FW: add connection test packet test

This commit is contained in:
morgan 2024-09-24 16:04:38 +08:00
parent 52c9413bd9
commit e4cd004bf7
1 changed files with 7 additions and 1 deletions

View File

@ -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