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.

TMS320F28379D: EtherCat memcpy function

Part Number: TMS320F28379D

Hi - i have a crazy question.  First, i am implementing EtherCAT on the F28379D and am using the TMDSECATCNCD379D reference design.  I am using the SPI interface.  Everything is working fine (CoE, FoE, process data transfers - no issues).

But i ran into a byte vs word problem which got me looking at the memcpy function implemented in the C28xxsystem.c file.  The function is called c28xx_memcpy(s1, s2, n) and is setup to copy n bytes from s2 into s1.  But the <string.h> memcpy function works on 16-bit words.  So the c28xx_memcpy  function simply calls memcpy with n divided by 2.  And, in my mind, this should work fine except when n is odd. 

So, assuming i am right, is TI assuming n is always even?  And if so, how is that guaranteed?

I also checked in the ..\libraries\communications\EtherCat\f2838x\ssc_configuration\cpu1\f2838x_cpu1_system.c file and noted it uses the same logic.

Thanks for you help!

Brett