Load app from sdcard on K210, but panicked on qemu.

This commit is contained in:
Yifan Wu 2020-12-20 00:52:14 +08:00
parent 760de97155
commit a3802a4b91
18 changed files with 177 additions and 142 deletions

View file

@ -717,7 +717,7 @@ lazy_static! {
fn init_sdcard() -> SDCard<SPIImpl<SPI0>> {
// wait previous output
usleep(100000);
let peripherals = Peripherals::take().unwrap();
let peripherals = unsafe { Peripherals::steal() };
sysctl::pll_set_freq(sysctl::pll::PLL0, 800_000_000).unwrap();
sysctl::pll_set_freq(sysctl::pll::PLL1, 300_000_000).unwrap();
sysctl::pll_set_freq(sysctl::pll::PLL2, 45_158_400).unwrap();