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

bootloader sdk12 wont start application

Similar to the thread posted here, I am trying to merge SD+bootloader+application and flash this to a nrf52 using the Segger programmer. This saves us a huge amount of time in factory when building our product. We have recently migrated to sdk12, which uses a new bootloader. Previously with sdk11, we would send the following command to force the bootloader to start the application when programming it:

nrfjprog --family nRF52 --memwr 0x7f000 --val 1

IE, we force the APP_VALID flag to 1in the m_bootloader_settings. Now, I am trying to do something similar by forcing .image_crc to 0 and .bank_code to 1 (NRF_DFU_BANK_VALID_APP). This does not appear to work and the following commands are what I am sending:

nrfjprog --family nRF52 --memwr 0x7f01C --val 0 //this is s_dfu_settings.bank_0.image_crc

nrfjprog --family nRF52 --memwr 0x7f020 --val 1 //this is s_dfu_settings.bank_0.bank_code

What am I doing wrong or is there a simpler way to force the bootloader to start the application? Thank you very much for any help!

Sean

edit: also, when I memrd address 0x7f020, the result I get is 0. Is this modified somewhere else in the code after execution of the bootloader?

Parents
  • Hi Seanbites,

    The trick to write 1(NRF_DFU_BANK_VALID_APP) directly to set the bank_code flag in bootloader setting won't work any more with the new bootloader from SDK v12.

    Now you need to write the whole bootloader setting because CRC check is used for the bootloader setting also.

    Fortunately, we has a tool (nrfutil) to do that :) You can have a look here.

    You should be able to genereate a bootloader_setting.hex file which contain the setting needed. You then can either write that in to the page (0x7F000) or can simply merge it with the bootloader and application+softdevice.

Reply
  • Hi Seanbites,

    The trick to write 1(NRF_DFU_BANK_VALID_APP) directly to set the bank_code flag in bootloader setting won't work any more with the new bootloader from SDK v12.

    Now you need to write the whole bootloader setting because CRC check is used for the bootloader setting also.

    Fortunately, we has a tool (nrfutil) to do that :) You can have a look here.

    You should be able to genereate a bootloader_setting.hex file which contain the setting needed. You then can either write that in to the page (0x7F000) or can simply merge it with the bootloader and application+softdevice.

Children
Related