This tutorial is dedicated to students at phelma in the frame of the first year projects
and newbies too with STM32.
The Input Capture technique is used to capture a timer value based upon an event on an input pin.
The IC features are useful in applications that require frequency (time period) and pulse measurements.
The following equipment is used
- nucleo-l053r8 Board or equivalent which owns only 16 bits timers.
- Eclipse with the necessary packages for Nucleo boards installed
In this tutorial (PART1), one measures the time period between two rising edges of a PWM signal generated by the timer TIM21. The channel 2 of the timer TIM2 is configured for capturing a rising edge.
In a second part of the tutorial which will be published later, one will study a technique to bypass
the 16 bits timer limitations.