rtio_clocking: PLL requires a bit more time to lock

This commit is contained in:
mwojcik 2023-01-19 14:22:22 +08:00
parent ca102d69c3
commit 831079f95f
2 changed files with 5 additions and 4 deletions

View File

@ -111,6 +111,8 @@ pub fn main_core0() {
ram::init_alloc_core0();
gic::InterruptController::gic(mpcore::RegisterBlock::mpcore()).enable_interrupts();
info!("gateware ident: {}", identifier_read(&mut [0; 64]));
i2c::init();
#[cfg(feature = "target_kasli_soc")]
@ -141,9 +143,7 @@ pub fn main_core0() {
};
rtio_clocking::init(&mut timer, &cfg);
init_gateware();
info!("gateware ident: {}", identifier_read(&mut [0; 64]));
task::spawn(report_async_rtio_errors());

View File

@ -72,12 +72,13 @@ fn init_rtio(timer: &mut GlobalTimer, _clk: RtioClock) {
unsafe {
pl::csr::sys_crg::clock_switch_write(1);
}
timer.delay_ms(2);
timer.delay_ms(10);
// if it's not locked, it will hang at the CSR.
unsafe {
pl::csr::rtio_core::reset_phy_write(1);
}
// if it's not locked, it will hang at the CSR.
info!("SYS PLL locked");
}
#[cfg(has_drtio)]