How do I unload a key that was previously loaded by SHCI_C2_FUS_LoadUsrKey?
I have implemented AES encryption / decryption on a STM32WB55 using keys stored in FUS. However, I'm running into a problem when I try to encrypt or decrypt using a non-FUS key. I get a hardfault when the key is written to the registers. Which I assume is because the FUS user key is still loaded.
AN5185 defines the command FUS_UNLOAD_USR_KEY but there is no corresponding implementation in shci.h/shci.c. I implemented my own version of SHCI_C2_FUS_UnLoadUsrKey using SHCI_C2_FUS_LoadUsrKey as an example. But CPU2 is saying that is an unknown command.
What is the process to unload a key that is stored in FUS and / or use the CRYP peripheral with a non-FUS key after previously loading a key into it from FUS?
