Blocked in Unknown Function after wakeup from SYSTEMOFF w/Bootloader

Hi, I work with SES on an nrf52840 on a custom board. Here is my issue : 

My board can be wakeup from SYSTEM OFF with 2 interrupts on 2 differents GPIOs : 1 is connected on a button and the other is triggered when plugged on a custom charging station. The 2 interrupts where working well before adding the secure bootloader I use for DFU in BLE. When I add the bootloader to the memory of the nrf52840, only the button interrupt allow me to wakeup the board. When I plug the device and the second interrupt is triggered, the only information I can see in debug mode is the Unknown Function at 0x00025D40, the processors seems to loop here during a while and then I can power my board again with the button.

Does anyone have an idea of the problem? here is my shutdown function :

//Enable powering on  
nrf_drv_gpiote_in_config_t my_config=NRFX_GPIOTE_CONFIG_IN_SENSE_HITOLO(false,NRF_GPIO_PIN_PULLUP);
  
err_code = nrf_drv_gpiote_in_init(BUTTON_PIN, &my_config, NULL);             //Initialize the wake-up 
APP_ERROR_CHECK(err_code);                                                  //Check error code returned
nrf_drv_gpiote_in_event_enable(BUTTON_PIN, true);     
  
err_code=nrf_drv_gpiote_in_init(STAT1_PIN, &my_config,NULL);
APP_ERROR_CHECK(err_code);
nrf_drv_gpiote_in_event_enable(STAT1_PIN, true);
 
//Enter System-off
err_code = nrf_sdh_disable_request();
// Softdevice was disabled before going into reset. Inform bootloader to skip CRC on next boot.
nrf_power_gpregret2_set(BOOTLOADER_DFU_SKIP_CRC);
 
NRF_POWER->SYSTEMOFF = 1; //Deep sleep

Related