MPC5748G- STM

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

MPC5748G- STM

1,500件の閲覧回数
SKC123
Contributor I

Hi

I am using MPC5748G SDK driver. I want time in millisecond using STM. Also I want  calculation. Also there is any other timer to give the time in millisecond .Please guide me.

Thank and regards

SKC123

 

0 件の賞賛
返信
1 返信

1,491件の閲覧回数
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

STM or PIT should be good choice for this.

PIT already has an option to read current value of the timer either in tick count or in microseconds. For example, there are functions like:

PIT_DRV_GetCurrentTimerCount

or

PIT_DRV_GetCurrentTimerUs

STM then has function STM_DRV_ComputeTicksByUs.

Or you can easily calculate the time like this: you know the source clock of a timer. One tick takes 1 / f_source_clock. And if you know the number of ticks, you can calculate the time as (1 / f_source_clock)*number_of_ticks.

Regards,

Lukas

0 件の賞賛
返信