This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Flash_ToggleTest has wrong frequency

I'm using the example code for a F28027 and am trying to check the PLL is set properly through Flash_ToggleTest() in the Flash API.  It is always 1.25MHz instead of the required 10kHz.

My code is just basic and is loaded through SCI_Boot.  I use GPIO32 to read the output.  The functions being called are the ones provided by the examples (DSP2802x_SysCtrl.c, etc).  There is 18.432MHz between X1 & X2, but INTOSC1 is being used.  I get 60MHz on XCLKOUT.

If anybody has any ideas why this could not be working, I would love to hear them!  The code is below.


void main(void)
{
// PLL, WatchDog, enable Peripheral Clocks
InitSysCtrl();

// Disable CPU interrupts
DINT;

// The default state is all PIE interrupts disabled and flags are cleared
I
nitPieCtrl();

// Disable CPU interrupts and clear all CPU interrupt flags:
IER = 0x0000;
IFR = 0x0000;

// Initialize the PIE vector table with pointers to the shell Interrupt

// Service Routines (ISR).

InitPieVectTable();

// Init flash
InitFlash();

Flash_CPUScaleFactor = SCALE_FACTOR;
Flash_CallbackPtr = 0;

EALLOW;
GpioCtrlRegs.GPBMUX1.all = 0;
GpioCtrlRegs.GPBDIR.all = 0x00000001;
EDIS;
Flash_ToggleTest(&GpioDataRegs.GPBTOGGLE.all, 0x00000001);
}