2014-05-26 12:18 AM
dear all,
i am developing the project with the name frequency module, here i am trying to capturing the frequency from 10 hz to 999hz , i am facing some error in the capturing , if i give constant freq it varies with the 2 hz of tolerance, if i try to solve that , it will affect in higher range of frequency, i kindly request you all to help me regarding this regards sowmya #fsm #fsm2014-05-26 12:11 PM
Which STM32 part? How are you measuring it now? What settings on the timer?
Use a 32-bit timer, clock it as fast as possible. Use Input Capture, or PWM Input mode. For frequency you can also use the IC prescaler.2014-05-26 10:45 PM
2014-05-27 09:18 AM
There is far too much to wade through there. The pin/tim connectivity is not well described.
I will observe that a 16-bit count wraps at 65536 not 65535. I would use the interrupt on the slower (slave) timer, and I would be sure to clear the interrupt that I was servicing. If you can use one timer with 2us (500 KHz) ticks, you could measure a period between 1-100ms with that accuracy.