Skip to content

Commit

Permalink
Added support for Input Capture timer mode for frequency and pulse du…
Browse files Browse the repository at this point in the history
…ration measurement
  • Loading branch information
Nilolay committed Jan 1, 2025
1 parent 222d691 commit f3b5316
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/rtic2-timer-input-capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ mod app {
tim_2.set_duty(50);
tim_2.enable();

// It is necessary to connect pins PA0 and PA5 through a resistor of 1 kΩ - 10 kΩ

// Configuration of TIM2 in input capture mode
let (mut tim5, (ch1, ..)) = Timer::new(dp.TIM5, &clocks).capture_compare_hz(48000.kHz());
let mut ch1 = ch1.with(gpioa.pa0);
Expand Down

0 comments on commit f3b5316

Please sign in to comment.