mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 20:51:31 +11:00
Update rtic example to reset spinlocks in init
This commit is contained in:
parent
3d8f66df78
commit
e9a4f7e40b
|
@ -27,6 +27,11 @@ mod app {
|
|||
|
||||
#[init]
|
||||
fn init(c: init::Context) -> (Shared, Local, init::Monotonics) {
|
||||
// Soft-reset does not release the hardware spinlocks
|
||||
// Release them now to avoid a deadlock after debug or watchdog reset
|
||||
unsafe {
|
||||
hal::sio::spinlock_reset();
|
||||
}
|
||||
let mut resets = c.device.RESETS;
|
||||
let mut watchdog = Watchdog::new(c.device.WATCHDOG);
|
||||
let _clocks = init_clocks_and_plls(
|
||||
|
|
Loading…
Reference in a new issue