This is Will in Korea.
I have encountered an error during writing to flash memory.
In Motorware_12, I edit lap3a for use external crystal so I added some code. It worked fine in motorware_9 but not Moterware_12.
And the worst thing is this code kill my board I designed based on DRV8312&F28027 DK. After I write flash for the first time totally shutdowned, not be able to rewrite even erase.
The code is below.
// enable internal oscillator 1
CLK_disableOsc1(obj->clkHandle);
// disable the external clock in
CLK_disableClkIn(obj->clkHandle);
// disable the crystal oscillator
CLK_enableCrystalOsc(obj->clkHandle);
// disable oscillator 2
CLK_disableOsc2(obj->clkHandle);
// set the oscillator source
CLK_setOsc2Src(obj->clkHandle,CLK_Osc2Src_Internal);
CLK_setOscSrc(obj->clkHandle,CLK_OscSrc_External);
CLK_setTimer2Src(obj->clkHandle,CLK_Timer2Src_ExtOsc);
CLK_setTimer2PreScale(obj->clkHandle,CLK_Timer2PreScaler_by_4);
// set the low speed clock prescaler
CLK_setLowSpdPreScaler(obj->clkHandle,CLK_LowSpdPreScaler_SysClkOut_by_4);
// set the clock out prescaler
CLK_setClkOutPreScaler(obj->clkHandle,CLK_ClkOutPreScaler_SysClkOut_by_2);
.........
PLL_setDivideSelect(obj->pllHandle,PLL_DivideSelect_ClkIn_by_4);
C28xx: Flash Programmer: Error encountered when writing to flash memory ...
ERROR >> C28xx: Flash Programmer: Error erasing flash memory. Error erasing Sector A