AnsweredAssumed Answered

mmcau_aes_set_key problem

Question asked by Kevin Alden on Jul 10, 2015
Latest reply on Jul 10, 2015 by Kevin Alden

I am using KSDK 1.2 on a TWR-K64F120M.

 

I am having a strange issue with mmcau_aes_set_key.  When I store my key at certain program flash addresses the processor faults at mmcau_aes_functions.s line 104:

 

stmia   r2!, {r1,r3,r8-r9}

 

I haven't been able to find any kind of pattern, but so far these addresses work:

0005f32c

0005f354

 

And these do not:

0005f34c

0005f374

 

I can copy the key to an array in SRAM to work around this, but I just wanted to understand the root cause of this issue.  Is there a limitation to where we can store the key in memory?  Does the memory need to be aligned in a certain way?  The header file defines the key as const, so i don't expect the read only nature of program flash to be an issue.  Something is going wrong though.

 

Thanks

Outcomes