Matter window covering example with factory data on nrf5340

Hi,

i'm trying to build the window covering example with factory data on nrf5340 with ncs 2.2.0 according to https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/matter/nrfconnect_factory_data_configuration.html

when running he example it stops with:

E: 178 [DL]Failed to protect the factory data partition.
E: Exited with code 2000016

partition in pm_static.yml is:

factory_data:
address: 0xfb000
size: 0x1000
region: flash_primary
the problem seems to be, that the mater code tries to lock the factory data partition, but fprotect can only lock block of size 0x4000 here: https://github.com/nrfconnect/sdk-nrf/blob/main/lib/fprotect/fprotect_spu.c#L19
Parents
  • increasing the size of the factory data partition to 16K works, but i would prefer to not waste 12K flash

  • Hello,

    Can I please ask how you generated your factory data? What command did you use? (mostly so that I can quickly reproduce the issue that you are seeing). Did you test this to see if it behaves the same in v2.3.0 as it does in v2.2.0?

    Jannis Konrad said:
    but i would prefer to not waste 12K flash

    I can understand that.

    Best regards,

    Edvin

  • Hi,

    i haven't tried 2.3.0. The quickest way to reproduce is to start a new window covering example and append these options to prj.conf:

    # Use Factory Data
    CONFIG_CHIP_FACTORY_DATA=y
    # Generate Factory Data from KConifg
    CONFIG_CHIP_FACTORY_DATA_BUILD=y
    CONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF01
     
    i get:
    uart:~$ I: nRF5 802154 radio initialized
    I: 4 Sectors of 4096 bytes
    I: alloc wra: 3, ab8
    I: data wra: 3, 6fc
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    I: Init CHIP stack
    I: 181 [DL]BLE address: C4:37:98:94:20:A9
    I: 204 [DL]OpenThread SED interval set to 500ms
    I: 219 [DL]OpenThread ifconfig up and thread start
    I: 227 [DL]OpenThread started: OK
    I: 230 [DL]Setting OpenThread device type to SYNCHRONIZED SLEEPY END DEVICE
    E: 238 [DL]Failed to protect the factory data partition.
    E: Exited with code 2000016
Reply
  • Hi,

    i haven't tried 2.3.0. The quickest way to reproduce is to start a new window covering example and append these options to prj.conf:

    # Use Factory Data
    CONFIG_CHIP_FACTORY_DATA=y
    # Generate Factory Data from KConifg
    CONFIG_CHIP_FACTORY_DATA_BUILD=y
    CONFIG_CHIP_DEVICE_DISCRIMINATOR=0xF01
     
    i get:
    uart:~$ I: nRF5 802154 radio initialized
    I: 4 Sectors of 4096 bytes
    I: alloc wra: 3, ab8
    I: data wra: 3, 6fc
    *** Booting Zephyr OS build v3.2.99-ncs1 ***
    I: Init CHIP stack
    I: 181 [DL]BLE address: C4:37:98:94:20:A9
    I: 204 [DL]OpenThread SED interval set to 500ms
    I: 219 [DL]OpenThread ifconfig up and thread start
    I: 227 [DL]OpenThread started: OK
    I: 230 [DL]Setting OpenThread device type to SYNCHRONIZED SLEEPY END DEVICE
    E: 238 [DL]Failed to protect the factory data partition.
    E: Exited with code 2000016
Children
Related