Other Parts Discussed in Thread: CONTROLSUITE, C2000WARE,
Ran code from control suite and trapped at estop limp mode. Wrote my own code per data sheet to clear clock circuit (see below) and still traps at estop stuck in limp mode. I checked w/ scope and do have 30 MHz on crystal and 1.9 Volts for the core. This is the exact experimenter kit that didn't have the FTDI EEPROM programmed. When checking SW2 it still had the tape over it. I suspect I have bad hardware that needs to be returned. Please advise.
int main(void)
{
unsigned int i;
DisableDog();
//
// Make sure the PLL is not running in limp mode
//
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 0) // If clock is limping
{
SysCtrlRegs.PLLSTS.bit.MCLKCLR = 1; // Then clear the missing clock detection circuits
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 0) // If clock is limping
{
SysCtrlRegs.PLLSTS.bit.MCLKCLR = 1; // Then clear again
for(i = 0; i < 0xff; i++); // Wait awhile
if (SysCtrlRegs.PLLSTS.bit.MCLKSTS != 0) // If clock is limping
//
// Missing external clock has been detected
// Replace this line with a call to an appropriate
// SystemShutdown(); function.
//
asm(" ESTOP0");
}