mismatch partition number from pm.config and runtime flash_map_entries on nrf54L15dk/external NOR Flash

PM_APP_OFFSET=0x0
PM_APP_ADDRESS=0x0
PM_APP_END_ADDRESS=0x165000
PM_APP_SIZE=0x165000
PM_APP_NAME=app
PM_APP_ID=0
PM_app_ID=PM_APP_ID
PM_app_IS_ENABLED=1
PM_0_LABEL=APP
PM_EXTERNAL_FLASH_OFFSET=0x0
PM_EXTERNAL_FLASH_ADDRESS=0x0
PM_EXTERNAL_FLASH_END_ADDRESS=0x800000
PM_EXTERNAL_FLASH_SIZE=0x800000
PM_EXTERNAL_FLASH_NAME=external_flash
PM_EXTERNAL_FLASH_ID=1
PM_external_flash_ID=PM_EXTERNAL_FLASH_ID
PM_external_flash_IS_ENABLED=1
PM_1_LABEL=EXTERNAL_FLASH
PM_LITTLEFS_STORAGE_OFFSET=0x0
PM_LITTLEFS_STORAGE_ADDRESS=0x0
PM_LITTLEFS_STORAGE_END_ADDRESS=0x800000
PM_LITTLEFS_STORAGE_SIZE=0x800000
PM_LITTLEFS_STORAGE_NAME=littlefs_storage
PM_LITTLEFS_STORAGE_EXTRA_PARAM_disk_cache_size=4096
PM_LITTLEFS_STORAGE_EXTRA_PARAM_disk_name=EXT_LFS
PM_LITTLEFS_STORAGE_EXTRA_PARAM_disk_read_only=0
PM_LITTLEFS_STORAGE_EXTRA_PARAM_disk_sector_size=512
PM_LITTLEFS_STORAGE_ID=2
PM_littlefs_storage_ID=PM_LITTLEFS_STORAGE_ID
PM_littlefs_storage_IS_ENABLED=1
PM_2_LABEL=LITTLEFS_STORAGE
PM_SRAM_PRIMARY_OFFSET=0x0
PM_SRAM_PRIMARY_ADDRESS=0x20000000
PM_SRAM_PRIMARY_END_ADDRESS=0x2002f000
PM_SRAM_PRIMARY_SIZE=0x2f000
PM_SRAM_PRIMARY_NAME=sram_primary
PM_NUM=3
PM_ALL_BY_SIZE="sram_primary app external_flash littlefs_storage"
PM_FOREACH_AFFILIATED_TO_disk(fn)= fn(LITTLEFS_STORAGE)
my_flash_disk.zip

Hi,

The attached code is based on a sample code from NCS v2.9.1 and creates a LittleFS flash disk on external SPI NOR onboard nrf54L15DK.
There is a mismatch in the code, when flash_map_entries should be 3 but is set as 1, mismatching from PM_NUM = 3.

Please, help to understand why this mismatch.
Thanks in advance.

Parents Reply Children
  • Thank you Sigurd. Looking foward to hearing from you asap. Meanwhile, I'm getting other issues too.

  • Hi Carlos,

    I checked your project today and would like to confirm if I am seeing the same thing you do, or if there is something wrong here.

    On the nRF54L15 DK, the application would quickly hard fault with this log:

    *** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
    *** Using Zephyr OS v3.7.99-ca954a6216c9 ***
    Erasing flash area ...  [00:00:00.430,732] <err> os: ***** BUS FAULT *****
     [00:00:00.430,737] <err> os:   Precise data bus error
     [00:00:00.430,742] <err> os:   BFAR Address: 0x40480000
     [00:00:00.430,753] <err> os: r0/a1:  0x20003780  r1/a2:  0x00008001  r2/a3:  0x50120000
     [00:00:00.430,761] <err> os: r3/a4:  0x00000000 r12/ip:  0x20003780 r14/lr:  0x0000da13
     [00:00:00.430,765] <err> os:  xpsr:  0x29000000
     [00:00:00.430,769] <err> os: Faulting instruction address (r15/pc): 0x00008002
     [00:00:00.430,791] <err> os: >>> ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
     [00:00:00.430,809] <err> os: Current thread: 0x20000dc0 (main)
     [00:00:00.503,479] <err> os: Halting system

    On the nRF52840 DK, the device would fail, but no log would be printed out.

    I was able to narrow down the failure to the fs_mount() call, but I haven't figured out why yet.

    I also have a question about the project. Is it designed to work with an empty external flash? I suspect the existing memory on my nRF52840 DK external flash to be at fault, so I erased it before testing. However, the issue persists.

    Hieu

Related