cancel
Showing results for 
Search instead for 
Did you mean: 

Input capture timer configuration

SUNIL C THOMAS
Associate
Posted on April 06, 2018 at 13:00

Hi friends,

What are the steps to configure input capture timer?

how we give correct prescaler and period values for that? 

Have any demo video for that?

Sunil

Calixto Systems

3 REPLIES 3
Posted on April 06, 2018 at 15:13

The *Input* Prescaler will determine how many edges the TIM wants to see. The Prescaler on the TIM itself will determine the rate at which CNT increments. What you pick depends on the frequency or time displacement you want to capture, and the size of the TIM 16 or 32-bit. You don't want the CNT to cycle multiple times during your proposed measurement interval.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 09, 2018 at 07:02

Turvey.Clive.002

Thanks for the reply.

I want to set my input capture timer to count a microseconds clock (eg 1000microseconds clock give to input, i want get my timer count 1000 ). What are the parameters i want to set for this? I used Keil SDK for my project.

Regards

Sunil

Calixto Systems

Posted on April 09, 2018 at 16:13

Prescaler = (SystemCoreClock / 1000000) - 1; // Clock timebase at 1 MHz (1us ticks)

Period = 0xFFFF; // for 16-bit or 0xFFFFFFFF for 32-bit

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..