|
Readme
This is a C language project that demonstrates
input capture interrupts used to measure period.
An interrupt is invoked on the rising edge of PA12.
The counter of TimerG0 is latched.
Period is calculated as the time difference between two interrupts.
The period measurement resolution is determined by the period of the selected clock
and prescale on TimerG0.
The precision of the measurement is determined by
the number of bits in the counter, which in this case is 16 bits.
The maximum period that can be measured is 65535*resolution.
This project does not check for period too long.
The MFCLK option has not been tested.
Build, debug, run the project.
In the following figure, the rising edge of PA12 triggers
the input capture interrupt. Notice the period of PA12
is 10ms. In this example, the resolution is 1us, and
the calculated Period will be 10000.

Derived from Texas Instrument code
- gpio_input_capture_LP_MSPM0G3507_nortos_ticlang
- gpio_toggle_output_LP_MSPM0G3507_nortos_ticlang
|