From 385b6cb52621965ad0e70818bd2cfd63fd063499 Mon Sep 17 00:00:00 2001 From: Tilman Sauerbeck Date: Sat, 4 Jan 2020 19:29:57 +0100 Subject: [PATCH] application: Perform system reset from panic handler if requested. This is untested; I'm not sure if it would work at all. --- src/application/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/application/main.rs b/src/application/main.rs index 4cad3e3..92429e5 100644 --- a/src/application/main.rs +++ b/src/application/main.rs @@ -79,6 +79,9 @@ impl Timer { #[panic_handler] fn panic(_info: &core::panic::PanicInfo) -> ! { loop { + if (gpio::get(gpio::GPIOA) & (1 << 12)) == 0 { + nvic::system_reset(); + } } } -- 2.30.2