mmCAU library causing processor fault

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mmCAU library causing processor fault

1,003 Views
mlu
Contributor I

I'm using the mmCAU library (mmcau_lib.a) for IAR and am getting a processor fault when trying to encode/decode AES packets that are not aligned.  As a work around, I can make an aligned copy of my data, but the expense of making a copy trashes performance.

 

The version I'm using of mmcau_lib.a is dated 18-April-2011.  Is there is newer version that has this issue fixed?  Is the source code available to allow me to fix and maintain the library myself?

0 Kudos
3 Replies

723 Views
bluehacker
Contributor III

Any MMCAU reference using a non-0-modulo-4 byte address (addr[1:0] ≠ 00) generates an error termination. So I think you must align the data

0 Kudos

723 Views
dspNeil
Contributor III
How do you align to a 4-byte boundary in CW10.2? Do you also need to modify the linker file to put all of the mmcau functions on 4-byte boundaries?
0 Kudos

723 Views
dspNeil
Contributor III

I've partly answered my own question. For every data buffer that I'm using, I do the following, and it seems to be working.

uint_8 buffer_data[BUFFERSIZE +4];

uint_8_ptr buffer = (uint_8_ptr)(((uint_32)buffer_data + 4) & ~0x3);

 

Is there a better way to data align in functions, without calling out static buffers that are aligned via the lcf file?

0 Kudos