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.

TMS570LS1224: The internal clock becomes slow accidentally, but happened just once, I don't know why, what is possible reason?

Part Number: TMS570LS1224
Other Parts Discussed in Thread: HALCOGEN

Hi, all. Here is a wierd problem. When I deploy my lunchpad to the car, it is connected to the external power source, which is a battery. It works fine at that time. And then, I disconnect the MCU to battery, and connect MCU to my PC so that I could reload my program in it. It works fine. Repeaded like this serveral times, I remember about 3 times, wierd thing happen. The lunchpad, RTI module, does not execute the RTI code, I debug it, and find the problem, it is caused by Internal Clock run super slow, almost does not tick. After 10 minutes reload same program, debug, set break points, power off and power on, then, it magically work, the clock run in its normal way. Note that, I remember I have not changed the code, have not change HalCoGen setting, since I know my code is correct. I guess it is 95% hardware issue. It only happened once, the following day, it works perfect, but I get horrified to this board, I think I must know the reason. Such situation only happen once, I have use this board half years, it only happen on that 10 minutes.

So, here is more information, in list form :

1. Our hardware is not reliable, the battery maybe provide unstable voltage and current to the board at the beginning, since hardware team have not measured, they do not know whether power is stable or not. MCU is not damaged, not shortened. MCU works perfect after that 10 minuutes.

2. That 10 minutes, I only reload, set break points, run, step through the code. THAT'S IT, I have not done any modification on the software, both code and config.

3. GPIO work, ADC work, but anything associated with Clock does not work properly. I mean, clock ticks, but ticks super slow, almost not tick. I write a for loop with 1000000 cycles, I cost almost forever to run it. Normally, it is about 100ms.

So, any idea about why clock ticks so slowly? Thanks.

  • Hi Joe,

    Our Hercules MCUs have an internal clock monitor or detector. If the oscillator fails (shorted to GND, or the frequency is out of the range), the clock detect switches the HF LPO frequency onto the oscillator source into the GCM. The HF LPO is about 10MHz which is much slower than your original system clock (160Mhz). The oscillator can be re-enabled if the failure is not caused by a hard-fault. The OSCFAIL flag in the Global Status Register (GLBSTAT) of the System and Peripheral Control Registers is also set.

    Like the oscillator, the PLL clock is configured by default to automatically switch-over to the oscillator in case of a PLL slip. In this case, the system clock and CPU clock are the same as the oscillator (for example 16Mhz). This issue is also recoverable.