AnsweredAssumed Answered

Unexpected behavior in kl25z TPM.

Question asked by Timothy Phillips on Mar 21, 2018
Latest reply on Mar 22, 2018 by Timothy Phillips

I am programming a kl25z on a Freescale FRDM-KL25Z board using assembly language. My IDE is CodeWarrior 10.7. My program is a simple LED-blink program. I use the TPM output compare interrupt to schedule the blinks.


The program works correctly when I connect TPM to the FLL. The program fails to work when I connect TPM to MCGIRCLK. The only differences between the two versions of the program are in SIM_SOPT2 TPMSRC (which selects the TPM clock) and in TPM0_SC PS (the TPM clock prescaler).


When I write corresponding C-programs with help of the Processor Expert, the C- program works both when TPM is connected to FLL and when TPM is connected to MCGIRCLK.


Why won't my assembly-language program work with TPM connected to MCGIRCLK?