Re: [PATCH v2 2/2] counter: microchip-tcb-capture: Add capture extensions for registers RA-RC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 2025. 02. 05. 1:11, William Breathitt Gray wrote:
On Mon, Feb 03, 2025 at 05:29:53PM +0100, Bence Csókás wrote:
TCB hardware is capable of capturing the timer value to registers RA and
RB. On top, it is capable of triggering on compare against a third
register, RC. Add these registers as extensions.

Signed-off-by: Bence Csókás <csokas.bence@xxxxxxxxx>

What is the difference between RA and RB (your code looks like they
represent two distinct event channels, so I want to confirm)? Is RC a
threshold value set by the user, or is it another captured timer value?
The capture extension represents Count value specifically, so I want to
make sure we're using the right extension for these components.

RA, RB and RC are three R/W-able "general purpose" hardware registers. The HW additionally has the following capabilities: * in PWM mode (not used by this driver), send an interrupt on compare to RA/B/C, and/or change output signals
* in Counter Capture mode (used here):
  * trigger interrupt on RC compare only
* on external trigger rising/falling edge, sample Counter Value Register (CV) to RA/RB, optionally send an interrupt of this change
  * stop counting after sampling to RB
All of this is enable-able of course.

So yes, RA and RB can be thought of two near-identical, separate channels. Since they both sample CV, it made sense to use COUNTER_EVENT_CAPTURE. RC is indeed set by the user.

Bence





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux