cancel
Showing results for 
Search instead for 
Did you mean: 

What is the difference between the use of GPIO_EXTI and a TIMER with Input Capture? Which are their best application respectively? Regards

LDi T
Associate
 
4 REPLIES 4
berendi
Principal

EXTI can wake up from low power modes, timer input capture can't (except LPTIM).

EXTI works even if the pin is in alternate function mode, assigned to another peripheral.

Input capture can mark the exact time, even separate for rising and falling edge, trigger other timer functionality, or (depending on the MCU series/line) more or less arbitrary DMA transfers.

With carefully constructed timer interconnections and DMA transfers, it's possible to start a complicated chain of events from a timer capture with no CPU intervention at all.

LDi T
Associate

For example, in an application where MCU has a pinout very fitted, an Hall sensor is best read with an GPIO_EXTI rather than with Timer?

berendi
Principal

Now that you mention Hall sensors, I forgot a very useful timer feature, digital filter on the input signals. It helped me once with an otherwise unreliable Hall sensor. Use the timer if you might need the filter.

OTOH, EXTI is asynchronous, i.e. can capture fast edges/pulses even at slow system clock.

JW