mciantyre / teensy4-rs

Rust support for the Teensy 4
Apache License 2.0
291 stars 32 forks source link

Fix soft reboot #60

Closed AlyoshaVasilieva closed 4 years ago

AlyoshaVasilieva commented 4 years ago

Previously it would just shut the Teensy 4 off.

See https://github.com/PaulStoffregen/cores/commit/d10668b560ef974fbac4e55249279f39e4b5bb72

To test, try this before and after:

const SCB_AIRCR: *mut u32 = 0xE000ED0C as *mut u32;
unsafe {
    core::ptr::write_volatile(SCB_AIRCR, 0x05FA0004);
}
mciantyre commented 4 years ago

Thanks for the fix! That's a stealthy default-high bit.