nRF9160 Key management error 528 – Not allowed when power off warning is active.

Using Modem FW 1.3.6.  Using NCS 2.6.0.

We're experiencing an issue in a test setup where we are getting this error reported (528) when trying to clear/set root certificates via modem_key_mgmt_delete() / modem_key_mgmt_write().

We haven't yet found any documentation around this error, and what this implies.

If this is error is raised, is there any way to clear it?

  • Hi,

    Can you please provide more information about your application? 

    Can you show the error? Please provide full error log.

    Best regards,
    Dejan

  • There's not really much to it. The application is built on top of the Memfault example.

    The fault we're seeing has only been seen when on a factory test jig, but consistently occurs.


    >[00:00:00.554,168] <inf> mflt: Removing Root CA 1004
    >[00:00:00.563,476] <wrn> modem_key_mgmt: Not allowed when power off warning is active
    >[00:00:00.563,537] <err> mflt: Failed to delete cert, err -140
    >[00:00:00.611,053] <inf> mflt: Cert 1001 in storage is not up-to-date
    >[00:00:00.611,114] <inf> mflt: Installing Root CA 1001
    >[00:00:00.615,814] <wrn> modem_key_mgmt: Not allowed when power off warning is active
    >[00:00:00.615,875] <err> mflt: Failed to provision certificate, err -140

    Ultimately the modem is returning 528 as the error code for the AT command as documented here.
    https://docs.nordicsemi.com/bundle/ref_at_commands/page/REF/at_commands/security/cmng_set.html

    Is this related to POFWARN? If so, is this latched/clearable, or does it indicate the power supply is currently at too low a voltage?
    We do not use/adjust this feature off of any default settings at the moment.

  • Hi,

    Looking at AT%CMNG set command, it seems to me that your problem is related to %XPOFWARN warning. When this warning is active, it blocks read, write and delete operations on keys and certificates. In addition, write and delete operations are allowed only when modem is not active. 
    Relevant register for power failure warning is EVENTS_POFWARN which you can find described in the chapter 5.7.1.1 of the nrf9160 product specification. You can read more about external power failure warning in the chapter 5.3.1 of the same product specification. The POFWARN event to the CPU can be cleared in the event register. 
    There is also register APPNVMCPOFGUARD which enables blocking of NVM write and aborting NVM erase.

    Best regards,
    Dejan

Related