How to use timer to achieve delay in MC56F8006?

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

How to use timer to achieve delay in MC56F8006?

1,565 次查看
khalil001
Contributor II

I am using the MC56F8006.

 

And I want to use timer to achieve delay .

 

Please tell me how to do it.

 

Thank you very very much.

标签 (1)
标记 (1)
0 项奖励
回复
4 回复数

1,409 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I do not suggest you can use timer to implement the delay. Generally, we suggest customer use nop instruction to generate delay. If you use Timer, you can start time so that it can count the ticks, you can poll the timer counter, when it reaches a predefined value the delay time corresponds to, you can disable timer, and execute the next instruction.

BR

Xiangjun Rong

0 项奖励
回复

1,409 次查看
khalil001
Contributor II

Use the TMR Hold Register and the TMR Counter Register?

0 项奖励
回复

1,409 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

It is okay to read the TMRn_CNTR directly if you only use one Timer.

BR

XiangJun Rong

0 项奖励
回复

1,409 次查看
khalil001
Contributor II

Thank you very much.

wish you have a happy life

0 项奖励
回复