diff --git a/src/runtime/src/main.rs b/src/runtime/src/main.rs index b83b2a4..d6c0fb1 100644 --- a/src/runtime/src/main.rs +++ b/src/runtime/src/main.rs @@ -22,6 +22,7 @@ use void::Void; use libconfig::Config; use libcortex_a9::l2c::enable_l2_cache; use libboard_artiq::{logger, identifier_read, init_gateware, pl}; +use embedded_hal::blocking::delay::DelayUs; const ASYNC_ERROR_COLLISION: u8 = 1 << 0; const ASYNC_ERROR_BUSY: u8 = 1 << 1; @@ -108,6 +109,9 @@ pub fn main_core0() { info!("NAR3/Zynq7000 starting..."); + init_gateware(); + timer.delay_us(500); // wait for FCLK to switch and MMCM to lock + ram::init_alloc_core0(); gic::InterruptController::gic(mpcore::RegisterBlock::mpcore()).enable_interrupts(); @@ -141,9 +145,8 @@ pub fn main_core0() { Config::new_dummy() } }; - + rtio_clocking::init(&mut timer, &cfg); - init_gateware(); task::spawn(report_async_rtio_errors());