Part Number: TMS320F28388D
I am trying to use CPU2 to bit-bang a serial-encoder, so I need a single function executing in CPU2 at the absolute fastest rate. The PLLSYSCLK is set to 200Mhz. CPU2 boots a calls a single function shown below:
void BackgroundTasks(void)
{
while (1)
{
GpioDataRegs.GPATOGGLE.bit.GPIO0 = 1;
__asm(" NOP");
}
}
Using an oscilloscope, the GPIO-pin toggles at ~160ns. In the debugger (with the debugger-clock enabled), each function-cycle takes 15 clocks, which should be ~75ns at 200Mhz. Looking at the disassembly for these 4 instructions:

Should take 7 cycles, or ~35ns.
I expect some of this is the IO-ring propagation delay, but I could only find the stated GPIO rise/fall times at 8ns, which should not be relevant.
Can you tell me why there are 3 different timing data -- 4 instructions that should take 7 cycles (35ns), are shown in the debugger-clock as 15 cycles (75ns), but actually take ~160ns?
Thanks,
Jim

