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.

CCS/TMS320F28069M: Debugging problem with External clock source (20MHz oscillator)

Part Number: TMS320F28069M
Other Parts Discussed in Thread: MOTORWARE

Tool/software: Code Composer Studio

Dear all,

I want to change clock source from internal clock source to external oscillator in motorware.

The 20MHz oscillator was connected at GPIO19 and X1 pin was grounded.

When I change the setting as following,

void HAL_setupClks(HAL_Handle handle)
{
HAL_Obj *obj = (HAL_Obj *)handle;

// set clock in pin
CLK_setXClkInSrc(obj->clkHandle, CLK_XClkInSrc_Gpio19);

// enable external source
CLK_enableClkIn(obj->clkHandle);

// set the oscillator source
CLK_setOscSrc(obj->clkHandle, CLK_OscSrc_External);

// disable the crystal oscillator
CLK_disableCrystalOsc(obj->clkHandle);

// disable internal oscillator 1
CLK_disableOsc1(obj->clkHandle);

// disable oscillator 2
CLK_disableOsc2(obj->clkHandle);

// set the low speed clock prescaler
CLK_setLowSpdPreScaler(obj->clkHandle, CLK_LowSpdPreScaler_SysClkOut_by_1);

// set the clock out prescaler
CLK_setClkOutPreScaler(obj->clkHandle, CLK_ClkOutPreScaler_SysClkOut_by_1);
}

void HAL_setupPll(HAL_Handle handle,const PLL_ClkFreq_e clkFreq)
{
HAL_Obj *obj = (HAL_Obj *)handle;

................

//PLL_setDivideSelect(obj->pllHandle,PLL_DivideSelect_ClkIn_by_2);

PLL_setDivideSelect(obj->pllHandle,PLL_DivideSelect_ClkIn_by_4);

................

return;

} // end of HAL_setupPll() function

Debugging works fine the first time after power on reset, but if I try to debug again after exiting the debugging session,

CCS show to me the "Break at address "0x3ff4fa" with no debug information available, or outside of program code."

or stopped @ PLL_resetClkDetect(obj->pllHandle); as following.

In this case, when I press again resume button, my board work. 

void HAL_setupPll(HAL_Handle handle,const PLL_ClkFreq_e clkFreq)
{
HAL_Obj *obj = (HAL_Obj *)handle;


// make sure PLL is not running in limp mode
if(PLL_getClkStatus(obj->pllHandle) != PLL_ClkStatus_Normal)
{
// reset the clock detect
PLL_resetClkDetect(obj->pllHandle);

// ???????
asm(" ESTOP0");
}

This situation never happened using internal clock source.

Please help me.

Sincerely,

Eui-heon