This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

IN DFU facing Issue in debug mood while activating new firmware image with Nordic SDK 16.0.0

Hello,

currently i am using nRF52832 board with Nordic SDK 16.0.0 and softdevice version 7.0.1

i have separated DFU service and bootloader code. added dfu service in my application and remove dfu functionality from bootloader so my application is taking firmware image packet from peer device and store it into bank1. after complete image transfer my application update the bank1 image size and CRC details in bootloader setting page then application set the gpregret register to signal the bootloader to activate new firmware image.

// function is used for jump in bootloader  

void signal_activation()

{

uint8_t read_exsting_val = nrf_power_gpregret_get();
nrf_power_gpregret_set( read_exsting_val | BOOTLOADER_ACTIVATION_START );
NVIC_SystemReset();

}

After this my bootloader code activate the new firmware.

But i am facing issue in debug mood, whole code is working fine in release mood and debug mood too when i attach debugger with anyone of the code. 

Free run in debug mood ( application and bootloader both in debug mood ), my new image is not activating 

i observed one more thing, same code working fine in both mood (release and debug) with SDK 15.0.3  and softdevice version 6

actually i updated my SDK from 15.3.0 to 16.0.0 and made all the changes which is required in SDK 16

  • Hi,

    Summing up, this works with release builds and debug builds when you are debugging, but fails with debug builds when a debugger is not attached. Is that correct? What constitutes a debug build in your project? No compiler optimization? Other changes?

    I would not expect a difference in this case, and it is hard to check what is going on since the issue is only reproduced when not debugging. There could be several explanations, for instance, similar to this.

    By the way, are you debugging the bootloader or application in this case?

Related