AnsweredAssumed Answered

Kinetis memcpy to 32-bit memory

Question asked by Brian Mitchell on May 28, 2014
Latest reply on Apr 23, 2015 by Brian Mitchell

I am using a K61 with MQX 4.0.2, CW 10.5, GCC 4.7.3 and 32-bit Flexbus memory. I would like to use memcpy with this memory. My accesses are all aligned, however, I see that the EWL version of memcpy will always uses byte access (I was expecting some optimizations to be there for long accesses).

 

I found mem_funcs.h functions and tried them as well with various issues.

__copy_mem - has the exact same behavior as memcpy unless the size is > 32 bytes.

__copy_longs_aligned - seems to have some bugs as the addresses are predecremented and get the incorrect data. I can work around it by sending the wrong addresses into the function, but this is ugly.

 

Has anyone else worked with the memory functions to optimize for performance and long words?

 

-Brian

Outcomes