cancel
Showing results for 
Search instead for 
Did you mean: 

32bit timer resolution

rockydt18
Associate II
Posted on July 28, 2009 at 02:18

32bit timer resolution

2 REPLIES 2
rockydt18
Associate II
Posted on May 17, 2011 at 13:18

Hey guys!

Could someone explain to me please in the application note ''an2592'' why they do this operations in the TIM3_IRQHandler()

{

if (MSB1 > MSB2)

{

MSB = 0xFFFF - ((MSB1 - MSB2)) - 1;

}

else

{

MSB = (MSB2 - MSB1) - 1;

}

i = 0;

i don't get the sense of this cases. It is important for me to understand this because i don't have an idea how to measure the period(not frequency) of an slow signal(my operating range is from 1-50Hz).

Regards dt

picguy
Associate II
Posted on May 17, 2011 at 13:18

Use one timer with an ISR that adds one to a word at the overflow FFFF=>0000. You now have a 48-bit timer. Reading in interruptible code is:

A = the 32-bit word

B = h/w timer

C = the 32-bit word again

If A!=C loop back

Else the 48-bit timer is A:B