SWCU193 April 2023 CC2340R2 , CC2340R5 , CC2340R5-Q1
This channel action continuously captures period and pulse width of the channel's input signal relative to the signal edge given by CnCFG.EDGE. The channel requests to set enabled events when CnCC.VALUE contains signal period and PCnCC.VALUE contains signal pulse width. The channel function synchronizes the timer counter to the selected signal edge of the incoming signal. Hence:
Example: Two channels in Timer Period and Pulse Width Capture
The timer measures signal period and pulse width of two different signals A (From IO Controller or Event Fabric) and B (From IO Controller or Event Fabric). See Chapter 387 and Section 4.3 for more information on configuring the I/O Controller and Event Fabric.
In this example, both signals have periods less than the counter range. Hence, time-out detection as described in the register documentation is not required. Configure as follows:
Figure 10-5 shows how the timer counter first synchronizes to signal A. Channel 0 then captures the high phase of signal A into PC0CC at time t0.The period of signal A is captured in C0CC at time t1. At the same time, Channel 0 sets the event output 0 high, and the timer counter starts to synchronize to signal B. Channel 1 then captures the low phase of signal B into PC1CC at time t2. Finally, the period of signal B is captured in C1CC at time t3. At the same time, channel 1 sets the event output 1 high, and the timer counter starts to synchronize to signal A. The sequence then repeats itself until stopped by the user.