[Linux-stm32] Counter device Interface for reading out input capture

Ahmad Fatoum a.fatoum at pengutronix.de
Thu Nov 5 18:46:14 UTC 2020


Hello Benjamin,
Hello Fabrice,

In the stm32-timer-cnt driver I find unused #defines for TIM_CCMR_MASK and
TIM_CCER_MASK, which to me hint that support for the "input capture mode"[1]
was implemented but removed prior to upstreaming.

It doesn't look like the counter device API is yet made to support such
an input capture mode (latching a counter value on an external event, e.g.
to timestamp incoming rising edges to measure jitter between pulses).

I am still very new to this, so I figured I ask whether you already have
thoughts (or maybe code to share) on how to best integrate this with the
counter device API.

I've added linux-iio/linux-stm32 to the CC as well, so if someone else
has an idea how to best do this, please share.

[1]: 40.3.7 in RM0436 rev 3

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the Linux-stm32 mailing list