0
\$\begingroup\$

I have some questions about timer capture and compare mode in the stm32

What is the role of these modes ?

Can i use compare mode in an application of voice recognition (compare 2 signals)?

\$\endgroup\$
2
\$\begingroup\$

1) Input capture mode is used to measure external digital signal. It is capturing a value of an internal counter once input channel transition is detected, thus is able to measure time between input transitions. So basically it allows to measure frequency or duty cycle of an external digital signal. Not analog, which audio signal is.
2) Output Compare mode is just a way to toggle some output pin when compare match is happening. It is good for generating square-wave signal with given parameters (PWM for instance) or just indicate when a given time period elapsed. Nothing to do with oudio as well.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.