How to use timer to achieve delay in MC56F8006?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use timer to achieve delay in MC56F8006?

711 Views
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.

Labels (1)
Tags (1)
0 Kudos
4 Replies

555 Views
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 Kudos

555 Views
khalil001
Contributor II

Use the TMR Hold Register and the TMR Counter Register?

0 Kudos

555 Views
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 Kudos

555 Views
khalil001
Contributor II

Thank you very much.

wish you have a happy life

0 Kudos