SPRZ292S December 2008 – November 2020 TMS320F28020 , TMS320F280200 , TMS320F28021 , TMS320F28022 , TMS320F28022-Q1 , TMS320F280220 , TMS320F28023 , TMS320F28023-Q1 , TMS320F280230 , TMS320F28026 , TMS320F28026-Q1 , TMS320F28026F , TMS320F28027 , TMS320F28027-Q1 , TMS320F280270 , TMS320F28027F , TMS320F28027F-Q1
Oscillator: CPU Clock Switching to INTOSC2 May Result in Missing Clock Condition After Reset
0, A, B
After at least two system resets (not including power-on reset), when the application code attempts to switch the CPU clock source to internal oscillator 2, a missing clock condition will occur, and the clock switching will fail under the following conditions:
The missing clock condition will recover only after a power-on reset when the failure condition occurs.
Before switching the CPU clock source to INTOSC2 via the OSCCLKSRCSEL and OSCCLKSRC2SEL bits in the CLKCTL register, the user must toggle the XCLKINOFF and XTALOSCOFF bits in the CLKCTL register as illustrated in the below sequence:
CLKCTL |= 0x6000; // XCLKINOFF = 1, XTALOSCOFF = 1
CLKCTL &=~0x6000; // XCLKINOFF = 0, XTALOSCOFF = 0
CLKCTL |= 0x6000; // XCLKINOFF = 1, XTALOSCOFF = 1
CLKCTL &=~0x6000; // XCLKINOFF = 0, XTALOSCOFF = 0
CLKCTL |= 0x6000; // XCLKINOFF = 1, XTALOSCOFF = 1
Once the above procedure is executed, then the OSC2 selection switches can be configured.
If the JTAG emulator is connected, and GPIO38 (TCK) is toggling, then the above procedure is unnecessary, but will do no harm.
If no clock is applied to GPIO38, it is also recommended that a strong pullup resistor on GPIO38 be added to VDDIO.