From 2a9aa9647069120df00b726269915669dcd48a45 Mon Sep 17 00:00:00 2001 From: "santiagogf89@gmail.com" <11235813f> Date: Mon, 14 Nov 2016 00:06:43 +0100 Subject: [PATCH] Add reset check for the bootloader. If a Power on Reset happens, the BL will jump to the application directly. If Reset pin is put to GND or SW reset happens, the bootloader will use the timeout function --- src/bootloader/src/bl_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootloader/src/bl_main.c b/src/bootloader/src/bl_main.c index 1bf1b0b..53d17a4 100644 --- a/src/bootloader/src/bl_main.c +++ b/src/bootloader/src/bl_main.c @@ -321,7 +321,9 @@ static peripheral_descriptor_t const *get_active_peripheral(void) { if (is_direct_boot()) { - //jump_to_application(applicationAddress, stackPointer); + if (RCM->SRS0 & RCM_SRS0_POR_MASK) { + jump_to_application(applicationAddress, stackPointer); + } } // Calculate how many ticks we need to wait based on the bootloader config. Check to see if