\n

ECAP

Peripheral Memory Blocks

address_offset : 0x0 Bytes (0x0)
size : 0x24 byte (0x0)
mem_usage : registers
protection :

Registers

ECAP_CNT (CNT)

ECAP_CNTCMP (CNTCMP)

ECAP_CTL0 (CTL0)

ECAP_CTL1 (CTL1)

ECAP_STS (STS)

ECAP_CTL2 (CTL2)

ECAP_HLD0 (HLD0)

ECAP_HLD1 (HLD1)

ECAP_HLD2 (HLD2)


ECAP_CNT (CNT)

Input Capture Counter
address_offset : 0x0 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_CNT ECAP_CNT read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CNT

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


ECAP_CNTCMP (CNTCMP)

Input Capture Counter Compare Register
address_offset : 0x10 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_CNTCMP ECAP_CNTCMP read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CNTCMP

CNTCMP : Input Capture Counter Compare Register
bits : 0 - 23 (24 bit)
access : read-write


ECAP_CTL0 (CTL0)

Input Capture Control Register 0
address_offset : 0x14 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_CTL0 ECAP_CTL0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 NFCLKS CAPNFDIS IC0EN IC1EN IC2EN CAP0SEL CAP1SEL CAP2SEL CAPTF0IEN CAPTF1IEN CAPTF2IEN CAPOVIEN CAPCMPIEN CPTST CMPCLR CPTCLR RLDEN CMPEN CAPEN CAPPHGEN

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.


ECAP_CTL1 (CTL1)

Input Capture Control Register 1
address_offset : 0x18 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_CTL1 ECAP_CTL1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CAPEDG0 CAPEDG1 CAPEDG2 CPRLDS CAPDIV CNTSRC

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.


ECAP_STS (STS)

Input Capture Status Register
address_offset : 0x1C Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_STS ECAP_STS read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 CAPTF0 CAPTF1 CAPTF2 CAPCMPF CAPOVF ECAP0 ECAP1 ECAP2

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


ECAP_CTL2 (CTL2)

Input Capture Control Register 2
address_offset : 0x20 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_CTL2 ECAP_CTL2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 RLDS0EN RLDS1EN RLDS2EN RLDOVSEN RLDMS CLRS0EN CLRS1EN CLRS2EN CPTCLRMS

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.


ECAP_HLD0 (HLD0)

Input Capture Counter Hold Register 0
address_offset : 0x4 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_HLD0 ECAP_HLD0 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 HOLD

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


ECAP_HLD1 (HLD1)

Input Capture Counter Hold Register 1
address_offset : 0x8 Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_HLD1 ECAP_HLD1 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

ECAP_HLD2 (HLD2)

Input Capture Counter Hold Register 2
address_offset : 0xC Bytes (0x0)
size : -1 bit
access : read-write
reset_value : 0x0
reset_Mask : 0x0

ECAP_HLD2 ECAP_HLD2 read-write 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Resets to Resets to 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


Is something missing? Is something wrong? can you help correct it ? Please contact us at info@chipselect.org !

This website is sponsored by EmbeetleEmbeetle, an IDE designed from scratch for embedded software developers.