From 61fa9c4bd8b96439c17ba4402641ea2e18df077e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sat, 17 Dec 2016 01:31:50 +0100 Subject: [PATCH] Implement JumpToBootloader() based on Santiago's snippet. --- right/src/usb_protocol_handler.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/right/src/usb_protocol_handler.c b/right/src/usb_protocol_handler.c index 482f003..8f99a9e 100644 --- a/right/src/usb_protocol_handler.c +++ b/right/src/usb_protocol_handler.c @@ -103,6 +103,10 @@ void GetSystemProperty() { } void JumpToBootloader() { + // We should reset the device here + SCB->AIRCR = (0x5FA<AIRCR = 0x05fA0002; // If the masked version doesn't work, this should also reset the core. + for(;;); } void GetSetTestLed()