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

NRF52832 Serial Bootloader(without SD) fails to boot app

Hi,

I am using NRF52832 in a custom board with SDK 15.3 and trying to implement the secure uart bootloader. I am able to download applications via uart bootloader however the application is not started after that. I verified that the application works separately without a bootloader.

My doubt is if there is no softdevice do I need to take of anything additional in the bootloader. Because in the code I can see that the bootloader tries to start the application by jumping to the end of MBR 0x1000, is this address same in this case also without a SD.

/** @brief The size that must be reserved for the MBR when a SoftDevice is written to flash.
This is the offset where the first byte of the SoftDevice hex file is written. */
#define MBR_SIZE (0x1000)

Parents
  • Hi Navaneeth,

    the Secure Serial bootloader is not dependent on the SoftDevice, i.e. it uses the NVMC directly to perform the flash operations instead of enabling the SoftDevice and using the SoftDevice Flash API. However, it(the bootloader) assumes that the application will be placed directly after the SoftDevice in flash, i.e. it assumes that there will be a SoftDevice present when starting the application. 

    Best regards

    Bjørn

  • rt.log

    PFA the bootloader log. From that I can see that it is placing the image to address 0x1000 which is end of MBR , since there is no SoftDevice present. Isn't this contrary to what you said? So in this case this should actually be starting my app but somehow it does not. 

    Please help in debugging this.

  • Hmm, seems that you are correct. How did you generate the DFU image? Previously one was forced to specify the --sd-req in nrfutil, which would result in the image being rejected as there were no SD present. 

    When you tested the application without the bootloader, did you flash the MBR and shift the application to 0x1000? 

  • When i tested i did not use MBR. 

    \examples\peripheral\cli\pca10040 -  this is the example i used as a starting point , just edited in SES and ran from there.

    I have used --sd-req in the nrfutil for generating DFU image.

    This is the command used to generate package.

Reply
  • When i tested i did not use MBR. 

    \examples\peripheral\cli\pca10040 -  this is the example i used as a starting point , just edited in SES and ran from there.

    I have used --sd-req in the nrfutil for generating DFU image.

    This is the command used to generate package.

Children
  • Ok, what is the Section Placement macro in the CLI project? Are these left to the default values, i.e.

    FLASH_PH_START=0x0

    FLASH_PH_SIZE=0x80000

    RAM_PH_START=0x20000000

    RAM_PH_SIZE=0x10000

    FLASH_START=0x0

    FLASH_SIZE=0x80000

    RAM_START=0x20000000

    RAM_SIZE=0x10000

    or have you modified them? If not then you need to set the FLASH_START to 0x1000 and the 0x7F000 and set RAM_START to 0x20000008 and RAM_SIZE to 0xFFF8

  • Hi,

    Thank you for the solution, actually I just read about this in one of the posts relating to MBR and tried and it worked.

    Is this documented anywhere? I feel it would be good to add this part in the uart dfu page.

    I am now able to perform DFU over uart without softdevice.

    Thanks