This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652RB: AES Driverlib Decryption Example - FaultISR() when AES functions called

Part Number: CC2652RB

I'm using the example code from the related question to do AES decryption in a bootloader without RTOS, on SDK 3.20.00.68 (which we can't change at the moment).  I'm including prcm.h and aes.h, and then running the example code right at the beginning of main().  It compiles, and I can run it up until the call to AESWriteToKeyStore().  It never returns from this function, and when I pause the debugger, it's stuck in FaultISR().  I commented that function out just to see if any of the AES functions worked, and some of them do, but AESWriteToKeyStore(), AESReadFromKeyStore(), AESStartDMAOperation(), and AESWaitForIRQFlags() at least are all one-way tickets to FaultISR().  What am I missing for this to work?

  • After much localizing of ROM functions and debugger stepping, it always failed when trying to read a crypto HWREG.  Turns out the comment of //POWER ON CYPTO ENGINE// wasn't a note about what the prior commands were doing, but instead a requirement to add some code.  Adding this made it work:

        PRCMPowerDomainOn(PRCM_DOMAIN_PERIPH);
        while (PRCMPowerDomainStatus(PRCM_DOMAIN_PERIPH) != PRCM_DOMAIN_POWER_ON);
        PRCMLoadSet();
        while (!PRCMLoadGet());

  • Hi,

    Glad to see you managed to find a solution.

    For other readers, this code can be copied from the Power driver (source\ti\drivers\power\PowerCC26X2.h). The function Power_setDependency() is usually responsible to run this code.

    Regards,