1
0
Fork 0

cxp downconn: push IDLE word to buf b4 tx&rx init

This commit is contained in:
morgan 2024-07-26 16:26:08 +08:00
parent 865434763d
commit 398eb135c7
1 changed files with 8 additions and 8 deletions

View File

@ -9,14 +9,6 @@ pub fn main(timer: &mut GlobalTimer) {
info!("turning on pmc loopback mode..."); info!("turning on pmc loopback mode...");
csr::cxp::loopback_mode_write(0b010); // Near-End PMA Loopback csr::cxp::loopback_mode_write(0b010); // Near-End PMA Loopback
// enable cxp gtx clock domains
csr::cxp::tx_start_init_write(1);
csr::cxp::rx_start_init_write(1);
info!("waiting for QPLL/CPLL to lock...");
timer.delay_us(50_000);
info!("tx_phaligndone = {} ", csr::cxp::txinit_phaligndone_read(),);
loopback_testing(timer, 0x00, 0); loopback_testing(timer, 0x00, 0);
} }
@ -62,6 +54,14 @@ pub fn main(timer: &mut GlobalTimer) {
csr::cxp::control_bit_6_write(DATA[1][6]); csr::cxp::control_bit_6_write(DATA[1][6]);
csr::cxp::control_bit_7_write(DATA[1][7]); csr::cxp::control_bit_7_write(DATA[1][7]);
// enable cxp gtx clock domains
csr::cxp::tx_start_init_write(1);
csr::cxp::rx_start_init_write(1);
info!("waiting for QPLL/CPLL to lock...");
timer.delay_us(50_000);
info!("tx_phaligndone = {} ", csr::cxp::txinit_phaligndone_read(),);
// enable txdata tranmission thought MGTXTXP, required by PMA loopback // enable txdata tranmission thought MGTXTXP, required by PMA loopback
csr::cxp::txenable_write(1); csr::cxp::txenable_write(1);