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

FStorage works in SES debugger, but not standalone

Using FStorage with SDK 15.3, I can write and read from flash storage with no problems.

When I flash the code directly, without the debugger, then the application has problems reading data from flash and hangs when trying to write to flash.

Is there an obvious reason for this?

  • I'm afraid I can't think of any obvious reasons for this. A program should generally function the same way regardless of whether you are in debug mode or not. How do you determine that it has problems with reading and that it hangs on write when you don't have a debugger attached? Do you have logging over UART enabled to see if any errors are being returned?  

  • I found the problem.

    When running from flash, I flash a bootloader (in addition to the SoftDevice and application).

    When running from the SES IDE, there is no bootloader.

    I was looking for the bootloader address using the deprecated NRF_UICR->NRFFW[0]

    With SDK 15.3 the bootloader address is found in MBR_BOOTLOADER_ADDR      (0xFF8)

    Once I fixed that, then the flashed version started to work because I wasn't overwriting the bootloader any more.

Related