I am running a simple test to see how fast a GPIO can toggle. I configured the F28035 for 60MHz operation (confirmed via XCLOCK OUT). I ran the loop shown below, and also show the single cycle assembly instruction being executed.. To avoid Pipeline effects, I execute over 8 GPIO Toggles in a row. The best toggle rate I get is 117nS. I tried this with and without ENPROT (write/read protection) enabled. So, based on what I'm seeing, it appears the GPIO can toggle no faster than the length of the pipeline from RAM. Am I missing something?
while(1) { GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1; GpioDataRegs.GPATOGGLE.bit.GPIO19=1;
}
ASSEMBLY CODE:
GpioDataRegs.GPATOGGLE.bit.GPIO19=1;
0x008023: 1A070008 OR @0x7, #0x0008
333 GpioDataRegs.GPATOGGLE.bit.GPIO19=1;
0x008025: 1A070008 OR @0x7, #0x0008
334 GpioDataRegs.GPATOGGLE.bit.GPIO19=1;
0x008027: 1A070008 OR @0x7, #0x0008
335 GpioDataRegs.GPATOGGLE.bit.GPIO19=1;
0x008029: 1A070008 OR @0x7, #0x0008