commission error after enable matter T-FM

Hi everyone,

I'm developing a Matter device on the nRF54L15 platform using NCS 2.9.0. When commissioning the device via HomePod and iPhone, the device unexpectedly reboots during the commissioning process.

Issue Description:

When I enable T-FM (build with */_ns), the device hits a Secure Fault and resets during communication handling ReadRequest messages. However, if I disable the T-FM, the commissioning process completes normally without reboots.

Here is a snippet of the error log around the reboot: 

E: ***** SECURE FAULT *****
E: Address: 0x2b
E: Attribution unit violation
E: r0/a1: 0x20010c30 r1/a2: 0x20036a28 r2/a3: 0x00000000
E: r3/a4: 0x00000000 r12/ip: 0x20036b20 r14/lr: 0x000c55e5
E: xpsr: 0x81000000
E: Faulting instruction address (r15/pc): 0x000c560c
E: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0
E: Current thread: 0x2001f0e8 (unknown)
E: Resetting system

Suspected Cause:

I suspect the issue is related to the partition table configuration for secure and non-secure regions. It looks like some memory regions may not be configured correctly or overlap, causing attribution faults in TF-M during secure commission operations.

Pm_static.yml:

Here is the relevant part of my partition table (addresses in hex): 

mcuboot: 0x0 - 0xD000

mcuboot_pad: 0xD000 - 0xE000

tfm: 0xE000 - 0x2E000

app: 0x2E000 - 0x109000

factory_data: 0x109000 - 0x10A000

settings_storage: 0x10A000 - 0x11A000

fillter_storage: 0x11A000 - 0x175000

tfm_storage: 0x175000 - 0x17D000

mcuboot_secondary_pad: 0x0-0x1000(external_flash)

mcuboot_secondary_app:0x1000-FC000(external_flash)

filling_storage:0xFC000-0x100000(external_flash)

Request for Help:

Could someone please help review my partition table and configuration?

Any suggestions or best practices for partitioning on nRF54L15 with Matter + TF-M?

Thanks in advance for your help!

Parents
  • That's what I modified according to the routine, but it gives me an error, here is my partition configuration, please help me analyze it, and what else could be causing the SECURE FAULT, as far as I know, prj.conf doesn't need any additional configurations, is that right?

    ### Partitions
    mcuboot:
      address: 0x0
      region: flash_primary
      size: 0xD000
    mcuboot_pad:
      address: 0xD000
      region: flash_primary
      size: 0x800
    tfm:
      address: 0xD800
      region: flash_primary
      size: 0x1F800
    app:
      address: 0x2D000
      region: flash_primary
      size: 0xDB000
    factory_data:
      address: 0x108000
      region: flash_primary
      size: 0x1000
    settings_storage:
      address: 0x109000
      region: flash_primary
      size: 0xA000
    fillter_storage:
      address: 0x113000
      region: flash_primary
      size: 0x62000
    tfm_storage:
      address: 0x175000
      orig_span: &id006
      - tfm_ps
      - tfm_its
      - tfm_otp_nv_counters
      region: flash_primary
      size: 0x8000
      span: *id006
    external_flash:
      address: 0xFB000
      size: 0x5000
      device: BY25Q80
      region: external_flash
    ### Bootloader configuration
    mcuboot_primary:
      orig_span: &id001
      - mcuboot_pad
      - tfm
      - app
      span: *id001
      address: 0xD000
      region: flash_primary
      size: 0xFB000
    mcuboot_primary_app:
      orig_span: &id002
      - app
      - tfm
      span: *id002
      address: 0xD800
      region: flash_primary
      size: 0xFA800
    mcuboot_secondary:
      address: 0x0
      orig_span: &id003
      - mcuboot_secondary_pad
      - mcuboot_secondary_app
      region: external_flash
      size: 0xFB000
      span: *id003
    mcuboot_secondary_pad:
      region: external_flash
      address: 0x0
      size: 0x800
    mcuboot_secondary_app:
      region: external_flash
      address: 0x800
      size: 0xFA800
    ### TFM configuration
    tfm_secure:
      address: 0xD000
      orig_span: &id004
      - mcuboot_pad
      - tfm
      region: flash_primary
      size: 0x20000
      span: *id004
    tfm_nonsecure:
      address: 0x2D000
      orig_span: &id005
      - app
      region: flash_primary
      size: 0xDB000
      span: *id005
    tfm_its:
      address: 0x175000
      inside:
      - tfm_storage
      placement:
        before:
        - tfm_otp_nv_counters
      region: flash_primary
      size: 0x2000
    tfm_otp_nv_counters:
      address: 0x177000
      inside:
      - tfm_storage
      placement:
        before:
        - tfm_ps
      region: flash_primary
      size: 0x2000
    tfm_ps:
      address: 0x179000
      inside:
      - tfm_storage
      region: flash_primary
      size: 0x4000
    ### RAM
    sram_secure:
      address: 0x20000000
      orig_span: &id007
      - tfm_sram
      region: sram_primary
      size: 0xF000
      span: *id007
    sram_nonsecure:
      address: 0x2000F000
      orig_span: &id008
      - sram_primary
      region: sram_primary
      size: 0x31000
      span: *id008
    tfm_sram:
      address: 0x20000000
      inside:
      - sram_secure
      placement:
        after:
        - start
      region: sram_primary
      size: 0xF000
    sram_primary:
      address: 0x2000F000
      region: sram_primary
      size: 0x31000
    

Reply
  • That's what I modified according to the routine, but it gives me an error, here is my partition configuration, please help me analyze it, and what else could be causing the SECURE FAULT, as far as I know, prj.conf doesn't need any additional configurations, is that right?

    ### Partitions
    mcuboot:
      address: 0x0
      region: flash_primary
      size: 0xD000
    mcuboot_pad:
      address: 0xD000
      region: flash_primary
      size: 0x800
    tfm:
      address: 0xD800
      region: flash_primary
      size: 0x1F800
    app:
      address: 0x2D000
      region: flash_primary
      size: 0xDB000
    factory_data:
      address: 0x108000
      region: flash_primary
      size: 0x1000
    settings_storage:
      address: 0x109000
      region: flash_primary
      size: 0xA000
    fillter_storage:
      address: 0x113000
      region: flash_primary
      size: 0x62000
    tfm_storage:
      address: 0x175000
      orig_span: &id006
      - tfm_ps
      - tfm_its
      - tfm_otp_nv_counters
      region: flash_primary
      size: 0x8000
      span: *id006
    external_flash:
      address: 0xFB000
      size: 0x5000
      device: BY25Q80
      region: external_flash
    ### Bootloader configuration
    mcuboot_primary:
      orig_span: &id001
      - mcuboot_pad
      - tfm
      - app
      span: *id001
      address: 0xD000
      region: flash_primary
      size: 0xFB000
    mcuboot_primary_app:
      orig_span: &id002
      - app
      - tfm
      span: *id002
      address: 0xD800
      region: flash_primary
      size: 0xFA800
    mcuboot_secondary:
      address: 0x0
      orig_span: &id003
      - mcuboot_secondary_pad
      - mcuboot_secondary_app
      region: external_flash
      size: 0xFB000
      span: *id003
    mcuboot_secondary_pad:
      region: external_flash
      address: 0x0
      size: 0x800
    mcuboot_secondary_app:
      region: external_flash
      address: 0x800
      size: 0xFA800
    ### TFM configuration
    tfm_secure:
      address: 0xD000
      orig_span: &id004
      - mcuboot_pad
      - tfm
      region: flash_primary
      size: 0x20000
      span: *id004
    tfm_nonsecure:
      address: 0x2D000
      orig_span: &id005
      - app
      region: flash_primary
      size: 0xDB000
      span: *id005
    tfm_its:
      address: 0x175000
      inside:
      - tfm_storage
      placement:
        before:
        - tfm_otp_nv_counters
      region: flash_primary
      size: 0x2000
    tfm_otp_nv_counters:
      address: 0x177000
      inside:
      - tfm_storage
      placement:
        before:
        - tfm_ps
      region: flash_primary
      size: 0x2000
    tfm_ps:
      address: 0x179000
      inside:
      - tfm_storage
      region: flash_primary
      size: 0x4000
    ### RAM
    sram_secure:
      address: 0x20000000
      orig_span: &id007
      - tfm_sram
      region: sram_primary
      size: 0xF000
      span: *id007
    sram_nonsecure:
      address: 0x2000F000
      orig_span: &id008
      - sram_primary
      region: sram_primary
      size: 0x31000
      span: *id008
    tfm_sram:
      address: 0x20000000
      inside:
      - sram_secure
      placement:
        after:
        - start
      region: sram_primary
      size: 0xF000
    sram_primary:
      address: 0x2000F000
      region: sram_primary
      size: 0x31000
    

Children
No Data
Related