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

Fstorage Address Range

Using SD S140 7.2.0 SDK 17 (nRF52840).

I cannot write to internal flash addresses above 0x78000.

I am calling nrf_fstorage_init setting start_addr=0x68000 and end_addr=0xF0FFF.

When using nrf_fstorage_write to for addresses above 0x78000 all seems to go well but no data is actually written (no hard fault or ASSERT or bad return value).

0x78000 seems to be the DFU start address on the x32 MCU. But we DO use x40 settings with S140 and setting proper address range on the ICF file (using IAR).

Any ideas?

BTW - when writing directly using the flash registers (NRF_NVMC->CONFIG) i DO manage to write to this memory space.

This is the ICF (linker) file:

define symbol __ICFEDIT_region_SD_start__ = 0x00000;
define symbol __ICFEDIT_region_SD_end__ = 0x26FFF;
define symbol __ICFEDIT_region_ROM_start__ = 0x27000;
define symbol __ICFEDIT_region_ROM_end__ = 0x67FFF;
define symbol __ICFEDIT_region_DROM_start__ = 0x68000;
define symbol __ICFEDIT_region_DROM_end__ = 0xF0FFF;
define symbol __ICFEDIT_region_DFU_start__ = 0xF1000;
define symbol __ICFEDIT_region_DFU_end__ = 0xFdfff;
define symbol __ICFEDIT_region_DDFU_start__ = 0xFF000;
define symbol __ICFEDIT_region_DDFU_end__ = 0xFFFFF;

Parents
  • We are using pca10056/s140 bootloader and we also see that the bootloader image is programmed to the correct location at the end of the 1M flash.

    The DFU is also working fine. 

    We manage to upgrade firmware over the air on our nRF52840 MCU using the x40 DFU.

    But still - when the firmware attempts to write to addresses above 0x78000 via nrf_fstorage nothing is written (unless we bypass the nrf_fstorage and use direct registers access).

    BTW - in the example linker file you provided there is a problem with the boot loader address. it should be 0xF10000 and not 0xF80000 (at least in this version of SDK - 7.0.2). 

Reply
  • We are using pca10056/s140 bootloader and we also see that the bootloader image is programmed to the correct location at the end of the 1M flash.

    The DFU is also working fine. 

    We manage to upgrade firmware over the air on our nRF52840 MCU using the x40 DFU.

    But still - when the firmware attempts to write to addresses above 0x78000 via nrf_fstorage nothing is written (unless we bypass the nrf_fstorage and use direct registers access).

    BTW - in the example linker file you provided there is a problem with the boot loader address. it should be 0xF10000 and not 0xF80000 (at least in this version of SDK - 7.0.2). 

Children
Related