Disabling nRF5340 TrustedZone Protected Storage (explicitly, and during runtime)

In a previous version of my project, that did NOT utilize TrustedZone, I was using a persistent storage library (NVS) and noticed that adding/using it would increase the current draw (checked on a nRF5340DK using the PPK2). In this current version, which DOES utilize TrustedZone (PSA Protected Storage), I suspect that it is similarly drawing some additional current.

To that note, I have several questions:

  • How do I explicitly disable PSA PS? I see in KConfig an option CONFIG_TFM_PARTITION_PROTECTED_STORAGE, but I'm getting build errors. Currently debugging it myself, but any places I should particularly look into?
  • Can PSA PS be disabled during runtime? I recall that certain peripherals can be turned off/on during runtime (such as with NCS v2.5.0, zephyr\samples\subsys\pm\device_pm). Is there a similar mechanism available for this?

To summarize, my setup is using a Windows 10 machine, nRF5340DK, PPK2, NCS v2.5.0, a project in VS Code based on that NCS at path zephyr\samples\tfm_integration\psa_protected_storage

------------

EDIT #1 - I'm not as concerned whether it is truly drawing a lot of current or not. I just want to see how PSA PS can be disabled explicitly, and how to disable/enable it during runtime.

Parents Reply
  • Hi,

     

    As mentioned, having a unused section or filesystem present shall not increase the current consumption.

    Can you please elaborate on what is the cause of your added current consumption?

     

    You can also have a look at the "build-folder/partition.yaml" to see how your flash is setup.

    I just want to see how PSA PS can be disabled explicitly, and how to disable/enable it during runtime.

    It is statically configurable, as per the kconfig that you initially mentioned.

      

    Kind regards,

    Håkon

Children
Related