I wanted to look at the speed of execution of the RM48L952 so I took the Hercules control card and connected an output SPICLK0 to my oscilloscope. I then wrote code to operate this pin as a GPIO and toggled it thus: (not actual code)
while (1)
{
SetGPIO
ResetGPIO
}
I expected that the signal will toggle at a very high speed somewhere in a few nano seconds, computing from the 220 MHz speed of the processor. But to my surprise I found that the actual level was about 250 nano seconds i.e. instruction speed of only 4 MHz.
I saw the disassembly of my code and found that there are about 8-10 instructions in each call - i.e. 32 - 40 MHz at one clock per instruction. Where am I making a mistake in this computation?