LPIT TMR_CUR_VAL sporadically returning 0xFFFF'FFFF

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPIT TMR_CUR_VAL sporadically returning 0xFFFF'FFFF

1,290件の閲覧回数
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,046件の閲覧回数
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,046件の閲覧回数
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 件の賞賛