\n
address_offset : 0x0 Bytes (0x0)
size : 0x24 byte (0x0)
mem_usage : registers
protection :
Input Capture Counter
address_offset : 0x0 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
CNT : Input Capture Timer/Counter (24-bit Up Counter)
The input Capture Timer/Counter is a 24-bit up-counting counter. The clock source for the counter is from the clock divider output which the ECAP_CLK is divided by 1, 4, 16, 32, 64, 96, 112 or 128.
bits : 0 - 23 (24 bit)
access : read-write
Input Capture Counter Compare Register
address_offset : 0x10 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
CNTCMP : Input Capture Counter Compare Register
bits : 0 - 23 (24 bit)
access : read-write
Input Capture Control Register 0
address_offset : 0x14 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
NFCLKS : Noise Filter Clock Pre-divided Selection
To determine the sampling frequency of the Noise Filter clock
bits : 0 - 2 (3 bit)
access : read-write
Enumeration:
#000 : 0
ECAP_CLK
#001 : 1
ECAP_CLK / 2
#010 : 2
ECAP_CLK / 4
#011 : 3
ECAP_CLK / 16
#100 : 4
ECAP_CLK / 32
#101 : 5
ECAP_CLK / 64
#110 : 6
ECAP_CLK / 128
#111 : 7
ECAP_CLK / 256
End of enumeration elements list.
CAPNFDIS : Disable Input Capture Noise Filter
bits : 3 - 3 (1 bit)
access : read-write
Enumeration:
#0 : 0
Noise filter of Input Capture Enabled
#1 : 1
The noise filter of Input Capture Disabled
End of enumeration elements list.
IC0EN : Enable Port Pin IC0 Input to Input Capture Unit
bits : 4 - 4 (1 bit)
access : read-write
Enumeration:
#0 : 0
IC0 input to Input Capture Unit Disabled
#1 : 1
IC0 input to Input Capture Unit Enabled
End of enumeration elements list.
IC1EN : Enable Port Pin IC1 Input to Input Capture Unit
bits : 5 - 5 (1 bit)
access : read-write
Enumeration:
#0 : 0
IC1 input to Input Capture Unit Disabled
#1 : 1
IC1 input to Input Capture Unit Enabled
End of enumeration elements list.
IC2EN : Enable Port Pin IC2 Input to Input Capture Unit
bits : 6 - 6 (1 bit)
access : read-write
Enumeration:
#0 : 0
IC2 input to Input Capture Unit Disabled
#1 : 1
IC2 input to Input Capture Unit Enabled
End of enumeration elements list.
CAP0SEL : CAP0 Input Source Selection
bits : 8 - 9 (2 bit)
access : read-write
Enumeration:
#00 : 0
CAP0 input is from port pin ECAP_P0
#01 : 1
CAP0 input is from signal ACMP_CO0 (Analog comparator 0 output)
#10 : 2
Reserved.
#11 : 3
Reserved.
End of enumeration elements list.
CAP1SEL : CAP1 Input Source Selection
bits : 10 - 11 (2 bit)
access : read-write
Enumeration:
#00 : 0
CAP1 input is from port pin ECAP_P1
#01 : 1
CAP1 input is from signal ACMP_CO0 (Analog comparator 0 output)
#10 : 2
Reserved.
#11 : 3
Reserved.
End of enumeration elements list.
CAP2SEL : CAP2 Input Source Selection
bits : 12 - 13 (2 bit)
access : read-write
Enumeration:
#00 : 0
CAP2 input is from port pin ECAP_P2
#01 : 1
CAP2 input is from signal ACMP_CO0 (Analog comparator 0 output)
#10 : 2
Reserved.
#11 : 3
Reserved.
End of enumeration elements list.
CAPTF0IEN : Enable Input Capture Channel 0 Interrupt
bits : 16 - 16 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF0 can trigger Input Capture interrupt
#1 : 1
Enabling flag CAPTF0 can trigger Input Capture interrupt
End of enumeration elements list.
CAPTF1IEN : Enable Input Capture Channel 1 Interrupt
bits : 17 - 17 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF1 can trigger Input Capture interrupt
#1 : 1
Enabling flag CAPTF1 can trigger Input Capture interrupt
End of enumeration elements list.
CAPTF2IEN : Enable Input Capture Channel 2 Interrupt
bits : 18 - 18 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF2 can trigger Input Capture interrupt
#1 : 1
Enabling flag CAPTF2 can trigger Input Capture interrupt
End of enumeration elements list.
CAPOVIEN : Enable CAPOVF Trigger Input Capture Interrupt
bits : 20 - 20 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPOVF can trigger Input Capture interrupt
#1 : 1
Enabling flag CAPOVF can trigger Input Capture interrupt
End of enumeration elements list.
CAPCMPIEN : Enable CAPCMPF Trigger Input Capture Interrupt
bits : 21 - 21 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPCMPF can trigger Input Capture interrupt
#1 : 1
Enabling flag CAPCMPF can trigger Input Capture interrupt
End of enumeration elements list.
CPTST : Input Capture Counter Start Bit
Setting this bit to 1, the capture counter (ECAP_CNT) starts up-counting synchronously with capture clock input (ECAP_CLK).
bits : 24 - 24 (1 bit)
access : read-write
Enumeration:
#0 : 0
ECAP_CNT stop counting
#1 : 1
ECAP_CNT starts up-counting
End of enumeration elements list.
CMPCLR : Input Capture Counter Clear by Compare-match Control
bits : 25 - 25 (1 bit)
access : read-write
Enumeration:
#0 : 0
Compare-match event (CAMCMPF) can clear capture counter (ECAP_CNT) Disabled
#1 : 1
Compare-match event (CAMCMPF) can clear capture counter (ECAP_CNT) Enabled
End of enumeration elements list.
CPTCLR : Input Capture Counter Clear by Capture Events Control
If this bit is set to 1, the capture counter (ECAP_CNT) will be cleared to 0 when any one of capture events (CAPTF0~3) occurs.
bits : 26 - 26 (1 bit)
access : read-write
Enumeration:
#0 : 0
Capture events (CAPTF0~3) can clear capture counter (ECAP_CNT) Disabled
#1 : 1
Capture events (CAPTF0~3) can clear capture counter (ECAP_CNT) Enabled
End of enumeration elements list.
RLDEN : The Reload Function Enable Control
Setting this bit to enable reload function. If the reload control is enabled, an overflow event (CAPOVF) or capture events (CAPTFx) will trigger the hardware to reload ECAP_CNTCMP into ECAP_CNT.
bits : 27 - 27 (1 bit)
access : read-write
Enumeration:
#0 : 0
Reload function Disabled
#1 : 1
Reload function Enabled
End of enumeration elements list.
CMPEN : The Compare Function Enable Control
The compare function in input capture timer/counter is to compare the dynamic counting ECAP_CNT with the compare register ECAP_CNTCMP, if ECAP_CNT value reaches ECAP_CNTCMP, the flag CAPCMPF will be set.
bits : 28 - 28 (1 bit)
access : read-write
Enumeration:
#0 : 0
Compare function Disabled
#1 : 1
Compare function Enabled
End of enumeration elements list.
CAPEN : Input Capture Timer/Counter Enable Control
bits : 29 - 29 (1 bit)
access : read-write
Enumeration:
#0 : 0
Input Capture function Disabled
#1 : 1
Input Capture function Enabled
End of enumeration elements list.
CAPPHGEN : Input Capture Flag Trigger PWM Phase Change Function Enable Control
bits : 30 - 30 (1 bit)
access : read-write
Enumeration:
#0 : 0
CAPTF2 or CAPTF1 or CAPTF0 trigger PWM phase change function Disabled
#1 : 1
CAPTF2 or CAPTF1 or CAPTF0 trigger PWM phase change function Enabled
End of enumeration elements list.
Input Capture Control Register 1
address_offset : 0x18 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
CAPEDG0 : Channel 0 Captured Edge Selection
Input capture can detect falling edge change only, rising edge change only or one of both edge change
bits : 0 - 1 (2 bit)
access : read-write
Enumeration:
#00 : 0
Detect rising edge
#01 : 1
Detect falling edge
#10 : 2
Detect either rising or falling edge
#11 : 3
Detect either rising or falling edge
End of enumeration elements list.
CAPEDG1 : Channel 1 Captured Edge Selection
Input capture can detect falling edge change only, rising edge change only or one of both edge change
bits : 2 - 3 (2 bit)
access : read-write
Enumeration:
#00 : 0
Detect rising edge
#01 : 1
Detect falling edge
#10 : 2
Detect either rising or falling edge
#11 : 3
Detect either rising or falling edge
End of enumeration elements list.
CAPEDG2 : Channel 2 Captured Edge Selection
Input capture can detect falling edge change only, rising edge change only or one of both edge change
bits : 4 - 5 (2 bit)
access : read-write
Enumeration:
#00 : 0
Detect rising edge
#01 : 1
Detect falling edge
#10 : 2
Detect either rising or falling edge
#11 : 3
Detect either rising or falling edge
End of enumeration elements list.
CPRLDS : ECAP_CNT Reload Trigger Source Selection
bits : 8 - 10 (3 bit)
access : read-write
Enumeration:
#000 : 0
CAPTF0
#001 : 1
CAPTF1
#010 : 2
CAPTF2
#100 : 4
CAPOVF
End of enumeration elements list.
CAPDIV : Capture Timer Clock Divide Selection
The capture timer clock has a pre-divider with eight divided options controlled by CAPDIV[2:0].
bits : 12 - 14 (3 bit)
access : read-write
Enumeration:
#000 : 0
ECAP_CLK / 1
#001 : 1
ECAP_CLK / 4
#010 : 2
ECAP_CLK / 16
#011 : 3
ECAP_CLK / 32
#100 : 4
ECAP_CLK / 64
#101 : 5
ECAP_CLK / 96
#110 : 6
ECAP_CLK / 112
#111 : 7
ECAP_CLK / 128
End of enumeration elements list.
CNTSRC : Capture Timer/Counter Clock Source Selection
Select the capture timer/counter clock source
bits : 16 - 17 (2 bit)
access : read-write
Enumeration:
#00 : 0
ECAP_CLK (Default)
#01 : 1
CAP0
#10 : 2
CAP1
#11 : 3
CAP2
End of enumeration elements list.
Input Capture Status Register
address_offset : 0x1C Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
CAPTF0 : Input Capture Channel 0 Captured Flag
When the input capture channel 0 detects a valid edge change at CAP0 input, it will set flag CAPTF0 to high.
Note: This bit is only cleared by writing 1 to itself through software.
bits : 0 - 0 (1 bit)
access : read-write
Enumeration:
#0 : 0
No valid edge change is detected at CAP0 input
#1 : 1
A valid edge change is detected at CAP0 input
End of enumeration elements list.
CAPTF1 : Input Capture Channel 1 Captured Flag
When the input capture channel 1 detects a valid edge change at CAP1 input, it will set flag CAPTF1 to high.
Note: This bit is only cleared by writing 1 to itself through software.
bits : 1 - 1 (1 bit)
access : read-write
Enumeration:
#0 : 0
No valid edge change is detected at CAP1 input
#1 : 1
A valid edge change is detected at CAP1 input
End of enumeration elements list.
CAPTF2 : Input Capture Channel 2 Captured Flag
When the input capture channel 2 detects a valid edge change at CAP2 input, it will set flag CAPTF2 to high.
Note: This bit is only cleared by writing 1 to itself through software.
bits : 2 - 2 (1 bit)
access : read-write
Enumeration:
#0 : 0
No valid edge change is detected at CAP2 input
#1 : 1
A valid edge change is detected at CAP2 input
End of enumeration elements list.
CAPCMPF : Input Capture Compare-match Flag
If the input capture compare function is enabled, the flag is set by hardware while capture counter (CNT) up counts and reach to the CNTCMP value.
Note: This bit is only cleared by writing 1 to itself through software.
bits : 4 - 4 (1 bit)
access : read-write
Enumeration:
#0 : 0
CNT does not match with CNTCMP value
#1 : 1
CNT counts to the same as CNTCMP value
End of enumeration elements list.
CAPOVF : Input Capture Counter Overflow Flag
Flag is set by hardware when input capture up counter (CNT) overflows from 0x00FF_FFFF to 0.
Note: This bit is only cleared by writing 1 to itself through software.
bits : 5 - 5 (1 bit)
access : read-write
Enumeration:
#0 : 0
No overflow occurs in CNT
#1 : 1
CNT overflows
End of enumeration elements list.
ECAP0 : Input Capture Source 0 Status (Read Only)
Input capture Source 0 (ECAP_P0) status. It is read only.
(The bit is read only and write is ignored)
bits : 8 - 8 (1 bit)
access : read-only
ECAP1 : Input Capture Source 1 Status (Read Only)
Input capture Source 1 (ECAP_P1) status. It is read only.
(The bit is read only and write is ignored)
bits : 9 - 9 (1 bit)
access : read-only
ECAP2 : Input Capture Source 2 Status (Read Only)
Input captureSource 2 (ECAP_P2) status. It is read only.
(The bit is read only and write is ignored)
bits : 10 - 10 (1 bit)
access : read-only
Input Capture Control Register 2
address_offset : 0x20 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
RLDS0EN : CATF0 Event Trigger Enable for RLD Event Source
bits : 0 - 0 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF0 can trigger RLD function
#1 : 1
Enabling flag CAPTF0 can trigger RLD function
End of enumeration elements list.
RLDS1EN : CAPTF1 Event Trigger Enable for RLD Event Source
bits : 1 - 1 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF1 can trigger RLD function
#1 : 1
Enabling flag CAPTF1 can trigger RLD function
End of enumeration elements list.
RLDS2EN : CAPTF2 Event Trigger Enable for RLD Event Source
bits : 2 - 2 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF2 can trigger RLD function
#1 : 1
Enabling flag CAPTF2 can trigger RLD function
End of enumeration elements list.
RLDOVSEN : CAPOVF Event Trigger Enable for RLD Event Source
bits : 3 - 3 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPOVF can trigger RLD function
#1 : 1
Enabling flag CAPOVF can trigger RLD function
End of enumeration elements list.
RLDMS : RLD Function Trigger Event Source Mode Selection
bits : 4 - 4 (1 bit)
access : read-write
Enumeration:
#0 : 0
RLD event source in normal mode
#1 : 1
RLD event source in enhanced mode
End of enumeration elements list.
CLRS0EN : CAPTF0 Event Trigger Enable for CPTCLR Event Source
bits : 8 - 8 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF0 can trigger CPTCLR function
#1 : 1
Enabling flag CAPTF0 can trigger CPTCLR function
End of enumeration elements list.
CLRS1EN : CAPTF1 Event Trigger Enable for CPTCLR Event Source
bits : 9 - 9 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF1 can trigger CPTCLR function
#1 : 1
Enabling flag CAPTF1 can trigger CPTCLR function
End of enumeration elements list.
CLRS2EN : CAPTF2 Event Trigger Enable for CPTCLR Event Source
bits : 10 - 10 (1 bit)
access : read-write
Enumeration:
#0 : 0
Disabling flag CAPTF2 can trigger CPTCLR function
#1 : 1
Enabling flag CAPTF2 can trigger CPTCLR function
End of enumeration elements list.
CPTCLRMS : CPTCLR Function Trigger Event Source Mode Selection
bits : 12 - 12 (1 bit)
access : read-write
Enumeration:
#0 : 0
CPTCLR event source in normal mode
#1 : 1
CPTCLR event source in enhanced mode
End of enumeration elements list.
Input Capture Counter Hold Register 0
address_offset : 0x4 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
HOLD : Input Capture Counter Hold Register
When an active input capture channel detects a valid edge signal change, the ECAP_CNT value is latched into the corresponding holding register. Each input channel has itself holding register named by ECAP_HLDx where x is from 0 to 2 to indicate inputs from IC0 to IC2, respectively.
bits : 0 - 23 (24 bit)
access : read-write
Input Capture Counter Hold Register 1
address_offset : 0x8 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
Input Capture Counter Hold Register 2
address_offset : 0xC Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0
Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !
This website is sponsored by Embeetle, an IDE designed from scratch for embedded software developers.