Regarding Timer value calculation

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

Regarding Timer value calculation

659 Views
maharajsankaran
Contributor I

Hi All,

We are using Freescale MPC5534.

we nedd to configure the timer for 2ms.

crystal value=16Mhz.we didn't get that formula.

Please share us, if any one known.

Thanks in advance.

Labels (1)
0 Kudos
Reply
1 Reply

507 Views
martin_kovar
NXP Employee
NXP Employee

Hi,

the general formula is next:  comparation value = (oscilator_frequency / prescaler) * time.

In your case it could be for example:  (16 000 000 / 256)*0.002 = 125 = 7DH.

Martin

0 Kudos
Reply