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 Reply
  • Hello,

    I managed to get it working, and ran it by our Matter team. They confirmed that this is a bug in v2.2.0 and v2.3.0. This will be fixed in a future release, and it is found here, so you can use it now:

    https://github.com/nrfconnect/sdk-nrf/pull/10561

    They said:

    So there are three options. Either increase the factory size, turn off FPROTECT or, as we did in the PR, keep the factory data on one flash page, but overlap the FPROTECT block with the application part. The last one is a bit tricky. It is fixed automatically on the pull request, but the client needs to ensure that the settings partition is not under FPRTOECT. 

    Best regards,

    Edvin

Children
Related