Unstable ZMS

I am facing an issue with unsuccessful zms initialization. For my case, it always seems like each of my boards can only work with zms in one project; I can update the code within the original project all I want, but switching to another program with zms will result in a failure, and switching back to the original is fine. For my development purposes, I have also tried to implement a button callback that calls zms_delete(), and pressing that will also result in the same failure problem. 

To resolve this issue, I have tried to:

- rebuilding the project, and flash it onto the board again.

- erase and reset with nRF Connect Desktop, then rebuilding and flash again.

- pressing the reset button on the board.

- disconnecting the board from the PC, then reconnecting it again.

- restarting my PC entirely.

Out of the above attempts, only restarting the PC entirely solves the problem; but this simply seems too complicated for a problem like this. 

My setup:

Microsoft Windows 10 Pro, nRF Connect SDK v2.8.0, nRF52840dk & nRF54L15

Below are the error messages: 

- flash_nrf: invalid address: 0x00100fe0:16
- fs_zms: zms not initialized. 
Parents
  • Hi,

     

    Q1: Which sample are you using to recreate this scenario? I would like to recreate this on my end as well.

     

    Q2: are you performing a full erase of the device when moving from one project with zms to another?

    The reason I ask is because they can overlap in address area between applications.

    Check your build-folder/partitions.yml and see if the "zms_storage" is changed between the two samples.

     

    Preferably share both .yml files.

     

    Q3: I suspect these are logs from a nRF52840 device?

    Below are the error messages: 

    - flash_nrf: invalid address: 0x00100fe0:16
    - fs_zms: zms not initialized. 

    If yes, then the 0x100fe0 is out-of-bounds of the flash itself, indicating that there's something with the originating fs structure (addr + size variables).

     

    Kind regards,

    Håkon

  • An update: 

    I copied the successful yml file to the unsuccessful project, and it still gave the same error of invalid address: 0x00100fe0:16 while trying to mount ZMS, even though I believe the address has made it clear that this is an invalid address.

Reply Children
  • Hi,

     

    Could you try to declare a zms_settings partition?

    Allan-led said:
    Here's the yml file from the project that does not work: 

    This yaml file does not seem to have a zms_storage partition:

    app:
      address: 0x0
      end_address: 0xf8000
      region: flash_primary
      size: 0xf8000
    nvs_storage:
      address: 0xf8000
      end_address: 0xfe000
      placement:
        before:
        - end
      region: flash_primary
      size: 0x6000
    settings_storage:
      address: 0xfe000
      end_address: 0x100000
      placement:
        align:
          start: 0x1000
        before:
        - end
      region: flash_primary
      size: 0x2000
    sram_primary:
      address: 0x20000000
      end_address: 0x20040000
      region: sram_primary
      size: 0x40000

     If you create a pm_static.yml file in your application/ folder containing this:

    zms_storage:
      address: 0xfa000
      end_address: 0x100000
      placement:
        before:
        - end
      region: flash_primary
      size: 0x6000

     

    And nothing else; it should adjust other partitions as needed in the new_build-folder/partitions.yml.

    PS: You need to do a new build (not pristine) for such static partition layout to be included.

     

    Kind regards,

    Håkon

Related