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.

  • Hi Carlos,

    First of all, my sincere apology for the long wait without follow up. I have been trying to figure out what could be wrong in your setup. However, such a debugging job is not easy to schedule during our understaffing situation, so I haven't made enough progress to respond to you, even though I feel really bad about keeping you waiting.

    Regarding the two videos you sent, the nRF54L15 shows that the execution paused in an exception handler. The nRF52840 one shows that while the execution was about to reach a point where flash initialization fails and an error is returned.

    A while back, I helped another customer setup the LittleFS sample to work with the nRF54L15 DK. The latest source code and a simple fix necessary to make it running are both provided in the case here:  Unable to Mount LittleFS File System On External Flash On NRF54L15-DK .

    I would like to recommend using this as a starting point instead, as further fixing the current project might take too much time while not yielding more benefit than this alternative.

    P.s: Here is the fixed reference project, for convenience.

    c346472_littlefs_250805_01.zip

  • Hi Hieu,

    Thank you very much for your quick reply.
    I will take a look in that case you have mentioned.
    BR

Related