AnsweredAssumed Answered

SysTick timer is running too fast

Question asked by Roger Chaplin on Jul 27, 2015
Latest reply on Jul 27, 2015 by Hui_Ma

We have a design with a MK64FN1M0VLQ12. One of our boards is acting strangely, while the others are okay.

 

The symptom is that the SysTick timer is apparently counting 25x too fast. We have measured all of the clocks using an oscilloscope (bring them out to pin PTA6) and they are all at the right frequency. The evidence of the too-fast counting is that the OSA_TimeDelay() call is giving me 1/25 the time I specify.

 

The clock configuration:

6.49 MHz crystal on EXTAL and XTAL.

PLL generates MCGOUTCLK of 118.98333 MHz.

Core clock divider is 1.

Bus clock divider is 2.

FlexBus clock divider is 4.

Flash clock divider is 8.

OSCERCLK (6.49 MHz) goes to the two ADCs.

 

I examined the SysTick control and reload registers on both good and bad boards using the debugger (IAR EWARM). On both the good and bad boards I see the same values. Everything on the bad board is working okay except that the MQX time delays are all 25x too short.

 

This "bad" board has been repaired a few times: MCU has been replaced, and some jumper wires glued down to the board using super glue. This super glue ran under the JTAG connector and around the pins. Is it possible that the MCU is sampling these pins at power on and the somewhat lower impedance is causing the MCU to switch to some undocumented operating mode? I've searched the reference manual for any mention of bootstrap pins and didn't find anything.

 

Replacing the MCU did not fix the problem. Cleaning off all the super glue with a suitable solvent did not fix the problem.

 

Thanks in advance for any and all pointers!

Outcomes