forked from M-Labs/artiq-zynq
downconn fw: add delay between rx test packet
downconn fw: change data size
This commit is contained in:
parent
feb621d003
commit
d46c5434de
|
@ -44,8 +44,7 @@ pub fn loopback_testing(channel: usize, timer: &mut GlobalTimer, speed: CXP_SPEE
|
||||||
cxp_proto::downconn_debug_send_trig_ack(channel);
|
cxp_proto::downconn_debug_send_trig_ack(channel);
|
||||||
|
|
||||||
const SEND_TIMES: usize = 4;
|
const SEND_TIMES: usize = 4;
|
||||||
const MAX_PACKET: usize = 128;
|
const DATA_MAXSIZE: usize = 48;
|
||||||
const DATA_MAXSIZE: usize = /*max size*/MAX_PACKET - /*Tag*/4 - /*Op code & length*/4 - /*addr*/4 - /*CRC*/4 ;
|
|
||||||
let mut data_slice: [u8; DATA_MAXSIZE] = [0; DATA_MAXSIZE];
|
let mut data_slice: [u8; DATA_MAXSIZE] = [0; DATA_MAXSIZE];
|
||||||
|
|
||||||
for i in 0..SEND_TIMES {
|
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");
|
.expect("loopback gtx tx error");
|
||||||
|
timer.delay_us(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
timer.delay_us(1000); // wait packet has arrive at RX async fifo
|
timer.delay_us(1000); // wait packet has arrive at RX async fifo
|
||||||
|
|
Loading…
Reference in New Issue