Skip to content

Added support for Input Capture timer mode for frequency and pulse duration measurement #830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025

Conversation

faunel
Copy link

@faunel faunel commented Jan 1, 2025

Added support for the Input Capture timer mode.

Why this is needed:

The Input Capture mode allows measuring signal frequency or pulse duration. This is especially useful for tasks that require precise frequency measurement, such as monitoring fan RPM, working with sensors, or analyzing signals. Additionally, a single timer can use up to four channels, enabling the measurement of multiple signals simultaneously.

@faunel
Copy link
Author

faunel commented Jan 2, 2025

Yes, I agree. That was code duplication.
I refactored it and added comments.

@leonidv
Copy link

leonidv commented May 23, 2025

Any updates about approving this PR?

@burrbull burrbull force-pushed the timer_input_capture branch 3 times, most recently from 9a814ac to 8e4b40a Compare May 24, 2025 08:59
@burrbull burrbull force-pushed the timer_input_capture branch from 8e4b40a to dfea4d7 Compare May 24, 2025 09:05
@burrbull
Copy link
Member

@leonidv Could you test it with last changes?

@leonidv
Copy link

leonidv commented May 24, 2025

I'm not a senior embedded developer. For now, I am trying to write reading codes from an IR Remote (tsp2038) using capture compare. When I finish, will use this PR to make the same application.

@burrbull burrbull force-pushed the timer_input_capture branch 2 times, most recently from 5730bd8 to ec48527 Compare July 10, 2025 08:51
@burrbull burrbull force-pushed the timer_input_capture branch from ec48527 to d38e2db Compare July 10, 2025 08:58
@burrbull burrbull enabled auto-merge July 10, 2025 08:59
@burrbull burrbull force-pushed the timer_input_capture branch from d38e2db to 1d15875 Compare August 11, 2025 06:12
@burrbull burrbull added this pull request to the merge queue Aug 11, 2025
Merged via the queue into stm32-rs:master with commit 3617dd7 Aug 11, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants