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

nrf52 dfu crc check

I use buttonless_dfu_app as template. SDK 14.2

Q1. Could someone help me.. After I updated my app I have changed crc (if more than just few changes), so bootloader installed into board from first dfu doesn't allow me to update app (can't accept crc). I've only found hard way to skip it

image description

I'm sorry I don't learn bootloader routine a lot, so my question is how much risks to get the brick from my chip after some updates at end user by OTA DFU.

Q2. I understand that we can update app + sd + bl every update. But I can't find any manuals how to update BL + SD by OTA. I found some short info on GITHUB

image description

but there're are not any of example of raw containes BL+SD (and separately) update OTA Should we generate package for pack sd+bl to there. Or should we pick just sd.hex, bl.hex from our app on smartphone? Could someone write me example raw for DFU softdevice 5.1.0, bootloader.

Q3. We can read firmware by execute command "nrfjprog --readcode flash_dump.hex" How can I protect my app by turning this ability off?

Thanks

  • But I did all steps from infocenter There're not any problem besides crc checking after I changed app a lot. and there are not example how to update bootloader OTA

  • Are you just flashing you application with a programmer, or are you sending the new application with OTA-DFU ?

    When you are flashing your new application to the nRF5x with a debugger/programmer, the current bootloader settings page is not updated automatically. So the CRC will not match, and the bootloader will not start the new application. In that case, you need to generate new bootloader settings page based on the new application every time you build a new application. Then merge this new settings page with your new application, and then flash over the new merged hex to the nRF5x. See this page and this page. If you don’t want to create a new bootloader settings page +merge it every time you flash a new application, you can bypass this(skip crc check), with the workaround I suggested in Q1.

    If you are not flashing the new application with a programmer(SWD), but doing OTA-DFU, then the bootloader settings page CRC field should be updated automatically with the CRC of the new application that is received.

Related