TPM timer initial delay when using 32kHz EXTAL

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

TPM timer initial delay when using 32kHz EXTAL

1,366 次查看
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?

标签 (1)
0 项奖励
回复
2 回复数

1,222 次查看
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 项奖励
回复

1,222 次查看
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