92
PSoC CY8CTMG20x and CY8CTST200 TRM, Document No. 001-53603 Rev. *C
TrueTouch Module
11.2
Register Definitions
The following registers are associated with the TrueTouch Module and are listed in address order. The register descriptions
have an associated register table showing the bit structure for that register. The bits in the tables that are grayed out are
reserved bits and are not detailed in the register descriptions that follow. Always write reserved bits with a value of ‘0’. For a
complete table of TrueTouch Module registers, refer to the
TrueTouch Register Summary on page 84
11.2.1
CS_CR0 Register
The TrueTouch Control Register 0 (CS_CR0) controls the
operation of the TrueTouch counters. Do not write bits [7:1]
while the block is enabled.
Bits 7 and 6: CSOUT[1:0].
These bits select between a
number of TrueTouch signals that can be driven to an output
pin. Refer to
and to the
.
Bit 5: CSD_PRSCLK.
This bit selects between IMO-P or
the PRS output as a clock source to drive the main capacitor
switch. ‘0’ selects IMO-P. ‘1’ selects PRS output.
Bit 4: CSD_CS_CLK.
This bit selects between IMO or
IMO-P for the TrueTouch counters to work. Depending on
this bit selection, either IMO or IMO-P is sent as the source
clock to the clock dividers, which generate CS_CLK as
shown in
. ‘0’ selects IMO. ‘1’
selects IMO-P.
Bit 3: CSD_MODE.
This bit enables the CSD mode. When
this bit is enabled, the TIMER1 block works on the IMO-P
(pre-scaled IMO) clock. This is also an enable for TrueTouch
counters to toggle.
‘0’ disables CSD mode. Programmable Timer1 works on
either CPUCLK/CLK32, (depending on CLKSEL bit selec-
tion in the PT1_CFG (0, B3h) register). ‘1’ enables CSD
mode.
When this bit is set to ‘1’, the Programmable Timer1 works
on IMO-P.
Note
: Once the CSD_MODE bit is enabled, the IMO-P clock
is a free running divider clock that cannot be stopped and re-
started. The IMO-P and the CPU clock are both derived from
the IMO clock but the phase relationship between them is
nondeterministic.
Bits 2 and 1: MODE[1:0].
These bits specify the operating
mode of the counter logic. The modes are shown in the fol-
lowing table.
Bit 0: EN.
When this bit is written to ‘1’, the counters are
enabled for counting. When this bit is written to ‘0’, counting
is stopped and all counter values are reset to zero. If the
counting mode is stopped in conjunction with an event (see
MODE[1:0]), the current count is held and read from the
counter registers. Toggle the EN bit to ‘0’ and then back to
‘1’ to start a new count.
For additional information, refer to the
.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
0,A0h
CSOUT[1:0]
CSD_
PRSCLK
CSD_CS_
CLK
CSD_
MODE
MODE[1:0]
EN
RW : 00
CSOUT[1:0]
Description
00
IN
01
CS_INT
10
COL
11
COH
MODE[1:0]
Description
00
Stop On Event
In this mode, the block starts counting when the EN bit is
set, and stops counting upon the selected interrupt event.
This mode allows the user to read the counter results in
firmware. Counting is restarted again by disabling and re-
enabling the block using the EN bit.
01
Pulse Width
In this mode, after the EN bit is set, the block waits for a
positive edge upon the data input selection to start the
counter, and then stops the counter upon the following neg-
ative edge of the data input. Polarity is adjusted with the
INV bit (CS_CR1). Counting is restarted by disabling and
re-enabling the block using the EN bit.
10
Period
In this mode, after the EN bit is set, the block waits for a
positive edge upon the data input selection to start the
counter, and then stops the counter upon the following pos-
itive edge of the data input. Polarity is adjusted with the INV
bit (CS_CR1). Counting is restarted by disabling and re-
enabling the block using the EN bit.
11
Continuous
In this mode, the counter is used to generate a periodic
interrupt. The period is set by the input clock selection in
conjunction with using one 8-bit counter (period=100h) or
the chained 16-bit counter (period = 10000h).
Summary of Contents for PSoC CY8CTMG20 Series
Page 4: ...4 Contents Overview Feedback...
Page 26: ...26 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section B PSoC Core Feedback...
Page 82: ...82 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Sleep and Watchdog Feedback...
Page 134: ...134 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C I2C Slave Feedback...
Page 142: ...142 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C System Resets Feedback...
Page 160: ...160 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C SPI Feedback...
Page 182: ...182 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Full Speed USB Feedback...
Page 302: ...302 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Glossary Feedback...