LPIT TMR_CUR_VAL sporadically returning 0xFFFF'FFFF

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

LPIT TMR_CUR_VAL sporadically returning 0xFFFF'FFFF

1,540 次查看
maddinhoffmann
Contributor I

We are using one LPIT channel as free running counter to measure execution times.

Sporadically, the LPIT current value register returns 0xFFFF'FFFF, although the actual counter value is different.

The counter reload value is not equal to 0xFFFF'FFFF, so I don't expect to read this value at all, while the timer is running.

DBG_EN and DOZE_EN are set to 0.

Is there any known issure regarding the LPIT timer wrt. to the described behavior?

Thanks!

Martin

0 项奖励
回复
2 回复数

1,296 次查看
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
We dealt with this problem recently. Reading/polling of this register can return invalid data.
The answer provided by design team:
“The LPIT was designed to be mainly used for interrupts and timeouts (in Compare and Accumulator modes). Only in capture mode does the timer value need to be read and this value is stable when read after an interrupt. Thus, there is no use case when software will need to know the current value of the timer when it is running.”

Could you please use another timer (FTM, LPTMR, RTC, SysTick, DWT) for your use case?

Thank you,

Daniel

0 项奖励
回复

1,296 次查看
maddinhoffmann
Contributor I

It seems, that this happens only when using SIRC_DIV2 as timer clock.

When using SOSC_DIV2 I cannot reproduce the behavior.

0 项奖励
回复