Using 28375D on CPU2 I am calling memcpy
memcpy(&theComplexMatrixResult->theComplexArray[0], &theComplexMatrixSource->theComplexArray[0], 4*theComplexMatrixResult->rows*theComplexMatrixResult->cols );
the first few ML instructions of memcpy in the disassembly window are:
CMPB AL, #0x00
MOVL @P, XAR4
MOVL XAR0, @XAR4
SB C$L2, EQ
MOVZ AR7, @AL
SUBB XAR7, #1
MOVZ AR6, @AR7
C$L1:
MOVZ AR7, *XAR5++
MOV *XAR0++, AR7
BANZ 65534, AR6--
NOw just focusing on the main loop (last 3 lines)
when I use the timer clock to time the cycles its taking 1 cycle for the MOVZ, 16 cycles for MOV and 32 for BANZ...
Is there some memory conflict with the particular memories it's copying from that causes this delay? Is there something I can do to ensure that this part of the loop only takes 3 cycles? instead of 49 cycles? as this adds up fast when copying memory.
Why am I observing such a long delay.
I have confirmed this delay is real by more than just your clock... since I am trying to execute an interrupt between samples, I can adjust my sample rate (which controls how many machine cycles I have between interrupts to copy this) and by experimentation I find that by decreasing the sample rate (increasing number of cycles available) everything starts to work when I give it enough time to copy the data... using the 49 per copy estimate I can set the sample rate so enough cycles exist, and the code does execute, so it does appear that it's going VERY slow.
This is executing in RAM not flash.
What could be the source of the conflict?