This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Is it possible to check if a KMU slot is used ?

Hello,

 I am using NCS v1.5.0 and would like to check is a KMU slot is being used or not. I erased the whole SoC and tried reading the directly the registers, in secure mode, as follows:

uint8_t hasKey = 0;
uint8_t i = 0;

for (i = 0; i < 4; i++)
{
    uint32_t value = NRF_UICR_S->KEYSLOT.KEY[2].VALUE[i];

    if (0xFFFFFFFF != value)
    {
        hasKey = 1;
        break;
    }
}

but the value is always 0xdeaddead. The same value is read when a key was present in the KMU slot.

I searched the NCS libraries and it seems it only supports writing a key into a KMU slot.

Is it possible to check if a KMU slot is in use ? 

Best regards, 

 Nelson

  • Hello,

    but the value is always 0xdeaddead.

    From the KMU documentation;

    "Step 2 will be blocked and word 0xDEADDEAD will be returned on AHB if any of the following violations are detected:

    • No key slot selected
    • Key slot not configured as readable
    • Key slot is revoked
    • AHB read to KEYSLOT.KEY[ID-1].VALUE[0-3] registers not belonging to selected key slot"

     

     

    Is it possible to check if a KMU slot is in use ? 

     I'm not aware of any ways to check this, but you can look at this and this and see if there are any registers you can use for that.

Related