The PSA lifecycle API enables setting the lifecycle state.
Setting a lower lifecycle state - for example, factory or test state - allows you to control the target root of trust (RoT) and change the debugging policy when testing or debugging.
The following is a state machine depiction of the PSA lifecycle:
Note: PSA lifecycle is not a standalone feature; it depends on PSA bootloader support, which has not yet been introduced in Mbed OS. The only lifecycle change currently supported is
PSA_LIFECYCLE_ASSEMBLY_AND_TEST, which you can use in testing to reset the device RoT state. All of the lifecycle changes represented by dashed lines in the diagram above have not yet been implemented.
You can specify the lifecycle value during build time using the
MBED_CONF_LIFECYCLE_STATE macro. The default lifecycle value is
In Mbed OS, the PSA lifecycle is implemented as part of the platform service.