I'm in the beginning steps of designing a digital controller using a F28035. I am currently prototyping on a F2803x control card using the free version of CCS4 for debugging and programming.
My question has to do with timing. I've set up the PLL to run the MCLK at 60MHz (the maximum) and the LSP_CLK to also run at 60MHz. I can verify that it is running this fast because the clock on the SPI is set to have a buad rate of 10MHz and I've verified this is the speed of that clock on an Oscilloscope.
I've noticed however that tasks on the made processor seem to take a lot longer than they should. As a simple exercise, I wrote a couple lines of code to turn a LED on the control card on and off.
GpioDataRegs.GPASET.bit.GPIO31=1;
GpioDataRegs.GPACLEAR.bit.GPIO31=1;
GpioDataRegs.GPASET.bit.GPIO31=1;
GpioDataRegs.GPACLEAR.bit.GPIO31=1;
GpioDataRegs.GPASET.bit.GPIO31=1;
GpioDataRegs.GPACLEAR.bit.GPIO31=1;
Viewing the disassembly, each one of these lines is a single line of assembly. When viewing this on an O-scope, a single cycle of the led takes 530ns which breaks down to about 15 clock cycles per line of assembly. Is it just me or is this an unreasonable amount of time for a single line (1A038000 OR @5,#0x8000)of assembly.
My actual problem is more specific and has to do with the amount of time it takes to send bytes over SPI (as master), but the above example is a simple characterization of the problem. Does anybody have any conjectures as to why the processor seems to be running slow? The only thing I can think of is that the debugger is taking up clock cycles looking for breakpoints. If this is the case, how may I run the processor at full speed?
Thank you for all your help