set fclk before doing anything else
This commit is contained in:
parent
83d530d8ac
commit
e6b9d5ebcb
@ -22,6 +22,7 @@ use void::Void;
|
|||||||
use libconfig::Config;
|
use libconfig::Config;
|
||||||
use libcortex_a9::l2c::enable_l2_cache;
|
use libcortex_a9::l2c::enable_l2_cache;
|
||||||
use libboard_artiq::{logger, identifier_read, init_gateware, pl};
|
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_COLLISION: u8 = 1 << 0;
|
||||||
const ASYNC_ERROR_BUSY: u8 = 1 << 1;
|
const ASYNC_ERROR_BUSY: u8 = 1 << 1;
|
||||||
@ -108,6 +109,9 @@ pub fn main_core0() {
|
|||||||
|
|
||||||
info!("NAR3/Zynq7000 starting...");
|
info!("NAR3/Zynq7000 starting...");
|
||||||
|
|
||||||
|
init_gateware();
|
||||||
|
timer.delay_us(500); // wait for FCLK to switch and MMCM to lock
|
||||||
|
|
||||||
ram::init_alloc_core0();
|
ram::init_alloc_core0();
|
||||||
gic::InterruptController::gic(mpcore::RegisterBlock::mpcore()).enable_interrupts();
|
gic::InterruptController::gic(mpcore::RegisterBlock::mpcore()).enable_interrupts();
|
||||||
|
|
||||||
@ -141,9 +145,8 @@ pub fn main_core0() {
|
|||||||
Config::new_dummy()
|
Config::new_dummy()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
rtio_clocking::init(&mut timer, &cfg);
|
rtio_clocking::init(&mut timer, &cfg);
|
||||||
init_gateware();
|
|
||||||
|
|
||||||
task::spawn(report_async_rtio_errors());
|
task::spawn(report_async_rtio_errors());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user