[Linux-stm32] Counter device Interface for reading out input capture
William Breathitt Gray
vilhelm.gray at gmail.com
Tue Nov 17 12:25:41 UTC 2020
On Tue, Nov 17, 2020 at 11:54:17AM +0100, Ahmad Fatoum wrote:
> Hello William,
>
> On 06.11.20 13:42, William Breathitt Gray wrote:
> > On Thu, Nov 05, 2020 at 07:46:14PM +0100, Ahmad Fatoum wrote:
> >> 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).
> >
> > Regarding the Counter subsystem, I'm developing a Counter character
> > device API that supports timestamps for counter devices:
> > https://lore.kernel.org/linux-arm-kernel/157d1edf-feec-33b5-7ad5-94f99316ca6e@lechnology.com/T/
>
> Any chance we could have a "raw" timestamp as well like the network
> stack offers (cf. SOF_TIMESTAMPING_{RAW,SYS}_HARDWARE)?
>
> The API currently only exposes a ktime (i.e. CLOCK_MONOTONIC), which the
> raw timer count can't be readily converted to. For our use case of
> measuring jitter, the raw value is sufficient.
Sure, we can add support for a "raw" timestamp. I can see how this could
be more useful in certain circumstances rather than the ktime value.
I'll open a discussion about it when I submit the next revision of the
Counter character device patchset. :-)
William Breathitt Gray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20201117/00ebf646/attachment.sig>
More information about the Linux-stm32
mailing list