This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

No debug after secure_dfu

Hi i have a problem i put buttonless dfu on my chip and everything went ok i can do OTA updates and everything works perfecly but i have a problem when i connect via j-link  and upload a sketch i do not have debug and i see on the nrf connect app this device as a "DFU tag" and cannot see debud or do anything. when i reupload the same sketch via OTA it works but still no debug via J-link i need to check parameters and cannot see them on the device. 

Parents
  • Hi,

    The secure bootloader in the nRF5 SKD use a dedicated page(bootloader settings) in flash for storing information relevant for the bootloader, including a flag indicating if the application is valid and a CRC of the application. If you program an application via a debugger without updating the bootloader settings, the CRC in the bootloader settings will not match the CRC of the application. In that case, the bootloader will not start the application, but will instead enter DFU mode in order to facilitate recovery.

    Because of the mechanism explained above, you need to generate and flash a bootloader settings page whenever you flash the application using a debugger. You can alternatively modify the bootloader to skip this check, by making app_is_valid() in <nRF5 SDK>/components/libraries/bootloader/nrf_bootloader.c always return true.

Reply
  • Hi,

    The secure bootloader in the nRF5 SKD use a dedicated page(bootloader settings) in flash for storing information relevant for the bootloader, including a flag indicating if the application is valid and a CRC of the application. If you program an application via a debugger without updating the bootloader settings, the CRC in the bootloader settings will not match the CRC of the application. In that case, the bootloader will not start the application, but will instead enter DFU mode in order to facilitate recovery.

    Because of the mechanism explained above, you need to generate and flash a bootloader settings page whenever you flash the application using a debugger. You can alternatively modify the bootloader to skip this check, by making app_is_valid() in <nRF5 SDK>/components/libraries/bootloader/nrf_bootloader.c always return true.

Children
No Data
Related