Free running timer on K82

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

Free running timer on K82

1,055件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hello !

 

For FreeRTOS profiling I need 32bit timer what is increment with clock 10-100kHz.

LPTIMERx resolution is not so good and timers used for other purposes.

From other side it is not so visible on K82 spec other simply timers. Only FTM/PTM like.

Could you suggest what kind of peripheral timer can be programmed  as simply running 32bit timer counter ?

Thank you !

Eugene

0 件の賞賛
4 返答(返信)

861件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hi Jing !

Yes it work as expected. I have chained Timer1 and Timer 0. And 1 count resolution - 100 Khz is enough for by used inside FreeRTOS fro profiling.

I try to configure PIT timers via embedded ConfigTools and even chaining is mentioned, it can't be set.

Regards,

Eugene

0 件の賞賛

861件の閲覧回数
EugeneHiihtaja
Senior Contributor I

Hi Jing !

PIT timer has resolution 32 bit and BusClock is only clock source for it.

If bus clock 48Mhz, it count full loop in ~ 89s.

What should be enough for short term measurements. FreeRTOS supports only 32bit counter only for keep track of task execution time.

May be have sense to use chained timer and use high 32bit and reload low timer every 10 us.

Regards,

Eugene

0 件の賞賛

861件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Yes, you can use chain mode.  There is examples in the reference manual.

Regards,

Jing

0 件の賞賛

861件の閲覧回数
jingpan
NXP TechSupport
NXP TechSupport

Hi Eugene,

PIT(periodic interrupt timer) is a good choice. Details please find in rm. There is also examples in SDK.

Regards,

Jing

0 件の賞賛