Skip to content

Commit

Permalink
turns out pfr should be initialized first before booting to bootrom
Browse files Browse the repository at this point in the history
  • Loading branch information
conorpp committed Sep 16, 2021
1 parent 4c841da commit 7948bba
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions runners/lpc55/src/initializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,22 +368,23 @@ impl Initializer {
)
};

if self.config.boot_to_bootrom {
info!("bootrom request start {}", perf_timer.elapsed().0/1000);
if self.is_bootrom_requested(&new_three_buttons, &mut delay_timer) {
// Give a small red blink show success
rgb.red(200); rgb.green(0); rgb.blue(0);
delay_timer.start(100_000.microseconds()); nb::block!(delay_timer.wait()).ok();

hal::boot_to_bootrom()
}
}
three_buttons = Some(new_three_buttons);
}

let mut pfr = pfr.enabled(&clocks).unwrap();
Self::validate_cfpa(&mut pfr, self.config.secure_firmware_version, self.config.require_prince);

if self.config.boot_to_bootrom && three_buttons.is_some() {
info!("bootrom request start {}", perf_timer.elapsed().0/1000);
if self.is_bootrom_requested(three_buttons.as_mut().unwrap(), &mut delay_timer) {
// Give a small red blink show success
rgb.red(200); rgb.green(200); rgb.blue(0);
delay_timer.start(100_000.microseconds()); nb::block!(delay_timer.wait()).ok();

hal::boot_to_bootrom()
}
}

stages::Basic {
delay_timer,
perf_timer,
Expand Down

0 comments on commit 7948bba

Please sign in to comment.