2009-07-27 05:18 PM
32bit timer resolution
2011-05-17 04:18 AM
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 dt2011-05-17 04:18 AM
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