Free running timer on K82

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

Free running timer on K82

1,685 次查看
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 回复数

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

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

1,491 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

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

Regards,

Jing

0 项奖励
回复

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