Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SDKv15.2.0 Problem With nrf_dfu_app_is_valid()

I'm using SDKv15.2.0

I think there is a problem in nrf_dfu_app_is_valid()  in components/libraries/bootloader/dfu/nrf_dfu_utils.c

If the CRC check fails, the return value should be false,  not NRF_DFU_DEBUG which evals to true and which would indicate the CRC check has passed.

Parents
  • Hi,

    Yes, it is correct that it should return false. However, this is actually intended behavior - the debug version of the bootloader will ignore CRC mismatch in order to simplify debugging during development . E.g. you don't have to update the CRC value in bootloader settings every time you re-compile the application code. The release version (built without NRF_DFU_DEBUG_VERSION)  will set NRF_DFU_DEBUG to "false" and therefore return false in case the CRC is invalid. 

     

Reply
  • Hi,

    Yes, it is correct that it should return false. However, this is actually intended behavior - the debug version of the bootloader will ignore CRC mismatch in order to simplify debugging during development . E.g. you don't have to update the CRC value in bootloader settings every time you re-compile the application code. The release version (built without NRF_DFU_DEBUG_VERSION)  will set NRF_DFU_DEBUG to "false" and therefore return false in case the CRC is invalid. 

     

Children
Related