Something is strange with my DSP's clock. I think it should be running at 100MHz but it vaguely seems like it's running at 50MHz instead. Here's what I know so far:
1) I am using the 28335 controlCARD with a 20MHz crystal.
2) I am using the DSP2833x_*.[c,h] files including DSP2833x_SysCtrl.c
(// $TI Release: DSP2833x/DSP2823x C/C++ Header Files V1.31 $
// $Release Date: August 4, 2009 $)
with InitSysCtrl() with DSP28_DIVSEL = 2, DSP28_PLLCR = 10 (so SYSCLKOUT should be 20MHz * 10 / 2 = 100MHz).
I have verified using the debugger that SysCtrlRegs.PLLSTS.all = 257 (in particular the PLLSTS.DIVSEL = 2) and SysCtrlRegs.PLLCR = 10.
3) I have a program that seems like it is running about half the speed I expect. I got suspicious and added these lines to toggle the GPIO25 pin:
GpioDataRegs.GPACLEAR.all = GPIO25MASK;
GpioDataRegs.GPATOGGLE.all = GPIO25MASK;
GpioDataRegs.GPATOGGLE.all = GPIO25MASK;
GpioDataRegs.GPATOGGLE.all = GPIO25MASK;
which compile to
MOV @PH,#0x0200
MOV @PL,#0
MOVW DP,#0x01BF
MOVL @4,P
MOVL @6,P
MOVL @6,P
MOVL @6,P
which *should* take 1 cycle per MOVL instruction. But when I look at the GPIO25 pin on an oscilloscope, it is showing up as toggle steps with 20ns duration. (e.g. 20ns low, 20ns high, and 20ns low).
Something doesn't make sense. Either the CPU clock is running at 50MHz instead of 100MHz, or the instruction set manual is wrong about MOVL [loc16], P taking only 1 cycle.
Any suggestions what to look at next?

