Initialization structure.

Public Attributes#

Mode to operate in.

uint32_t

Initial counter value (refer to reference manual for max value allowed).

uint32_t

Initial top value (refer to reference manual for max value allowed).

bool

Polarity of incoming edge.

bool

Counting direction, only applicable for pcntModeOvsSingle and pcntModeExtSingle modes.

bool

Enable filter, only available in pcntModeOvsSingle* mode.

bool

Set to true to enable hysteresis.

bool

Set to true to enable S1 to determine the direction of counting in OVSSINGLE or EXTCLKSINGLE modes.

Selects whether the regular counter responds to up-count events, down-count events, both, or none.

Selects whether the auxiliary counter responds to up-count events, down-count events, both, or none.

Select PRS channel as input to S0IN in PCNTx_INPUT register.

Select PRS channel as input to S1IN in PCNTx_INPUT register.

Public Attribute Documentation#

mode#

PCNT_Mode_TypeDef PCNT_Init_TypeDef::mode

Mode to operate in.


Definition at line 248 of file platform/emlib/inc/em_pcnt.h

counter#

uint32_t PCNT_Init_TypeDef::counter

Initial counter value (refer to reference manual for max value allowed).

Only used for pcntModeOvsSingle (and possibly pcntModeDisable) modes. If using pcntModeExtSingle or pcntModeExtQuad modes, counter value is reset to HW reset value.


Definition at line 254 of file platform/emlib/inc/em_pcnt.h

top#

uint32_t PCNT_Init_TypeDef::top

Initial top value (refer to reference manual for max value allowed).

Only used for pcntModeOvsSingle (and possibly pcntModeDisable) modes. If using pcntModeExtSingle or pcntModeExtQuad modes, top value is reset to HW reset value.


Definition at line 260 of file platform/emlib/inc/em_pcnt.h

negEdge#

bool PCNT_Init_TypeDef::negEdge

Polarity of incoming edge.


Definition at line 266 of file platform/emlib/inc/em_pcnt.h

countDown#

bool PCNT_Init_TypeDef::countDown

Counting direction, only applicable for pcntModeOvsSingle and pcntModeExtSingle modes.


Definition at line 270 of file platform/emlib/inc/em_pcnt.h

filter#

bool PCNT_Init_TypeDef::filter

Enable filter, only available in pcntModeOvsSingle* mode.


Definition at line 273 of file platform/emlib/inc/em_pcnt.h

hyst#

bool PCNT_Init_TypeDef::hyst

Set to true to enable hysteresis.

When enabled, PCNT will always overflow and underflow to TOP/2.


Definition at line 283 of file platform/emlib/inc/em_pcnt.h

s1CntDir#

bool PCNT_Init_TypeDef::s1CntDir

Set to true to enable S1 to determine the direction of counting in OVSSINGLE or EXTCLKSINGLE modes.


When S1 is high, the count direction is given by CNTDIR, and when S1 is low, the count direction is the opposite.


Definition at line 291 of file platform/emlib/inc/em_pcnt.h

cntEvent#

PCNT_CntEvent_TypeDef PCNT_Init_TypeDef::cntEvent

Selects whether the regular counter responds to up-count events, down-count events, both, or none.


Definition at line 297 of file platform/emlib/inc/em_pcnt.h

auxCntEvent#

PCNT_CntEvent_TypeDef PCNT_Init_TypeDef::auxCntEvent

Selects whether the auxiliary counter responds to up-count events, down-count events, both, or none.


Definition at line 303 of file platform/emlib/inc/em_pcnt.h

s0PRS#

PCNT_PRSSel_TypeDef PCNT_Init_TypeDef::s0PRS

Select PRS channel as input to S0IN in PCNTx_INPUT register.


Definition at line 308 of file platform/emlib/inc/em_pcnt.h

s1PRS#

PCNT_PRSSel_TypeDef PCNT_Init_TypeDef::s1PRS

Select PRS channel as input to S1IN in PCNTx_INPUT register.


Definition at line 311 of file platform/emlib/inc/em_pcnt.h