TPM timer initial delay when using 32kHz EXTAL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TPM timer initial delay when using 32kHz EXTAL

1,332 Views
jpatel1
Contributor I

I'm trying to use TPM clock on KL17 using external 32kHz crystal. I've initialized MOD value with 32, so expecting it to interrupt after 1ms.

But I always get the first interrupt from tpm counter after 120ms delay, subsequent interrupts happen at 1ms interval.

Any pointers to debugging this issue?

Labels (1)
0 Kudos
Reply
2 Replies

1,188 Views
jpatel1
Contributor I

Thanks Vincente for the response!

I am using gpio pin toggle when I initialize TPM timer and when I receive interrupt; measuring the delay using oscilloscope.

what is the best way to verify in code if crystal/clock stabilization has happened?  

I am using VLPS3 sleep mode with RTC configured for external crystal. I was expecting the delay will not happen when waking up from sleep as OSC still running in sleep mode. What am I missing here?

0 Kudos
Reply

1,188 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Hi

How are you measuring the first pulse, remember you will need to add the time for the clock stabilization