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

BLE_App_Buttonless_DFU Example not Operating after slight code changes.

Hi, 

I am trying to modify the code in the BLE_App_Buttonless_DFU_pca10040_s132 example is SES. Without any modification the code compiles fine and can be recognized by nRF Connect. However, when I make small code changes the program still compiles and flashes but the nRF52832 device cannot be seen or connected to in nRF Connect. Using J-Link RTT Viewer V6.40 I see the following output. Does anyone know what this may mean?

<info> app: Inside main
<debug> app: In nrf_bootloader_init
<debug> nrf_dfu_settings: Calling nrf_dfu_settings_init()...
<debug> nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
<debug> nrf_dfu_settings: Settings OK
<debug> app: Enter nrf_bootloader_fw_activate
<info> app: No firmware to activate.
<debug> app: Enter nrf_dfu_app_is_valid
<debug> app: CRC check of app failed. Return 1
<info> nrf_dfu_settings: Backing up settings page to address 0x7E000.
<debug> nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.
<debug> app: Running nrf_bootloader_app_start with address: 0x00001000
<debug> app: Disabling interrupts. NVIC->ICER[0]: 0x0
<debug> app: running irq table set
<debug> app: After running irq table set

Thanks for the help!

Parents
  • Hi BendaEng, 


    When you testing with the bootloader installed, there will be a CRC check on every startup of bootloader. The bootloader calculate the CRC from application firmware and compare to the stored CRC in the bootloader setting. 

    If you modify the app and then flash it directly using the programmer, this CRC check will fail. You would need to update your application via DFU process, then the CRC in bootloader setting will be updated. 

    But for development, the easier way is either set the CRC in bootloader setting to 0 so the bootloader will skip CRC check. Or you can modify the bootloader source code to disable CRC checking. Please have a look at dfu_enter_check() function in nrf_bootloader.c 

Reply
  • Hi BendaEng, 


    When you testing with the bootloader installed, there will be a CRC check on every startup of bootloader. The bootloader calculate the CRC from application firmware and compare to the stored CRC in the bootloader setting. 

    If you modify the app and then flash it directly using the programmer, this CRC check will fail. You would need to update your application via DFU process, then the CRC in bootloader setting will be updated. 

    But for development, the easier way is either set the CRC in bootloader setting to 0 so the bootloader will skip CRC check. Or you can modify the bootloader source code to disable CRC checking. Please have a look at dfu_enter_check() function in nrf_bootloader.c 

Children
No Data
Related