PCNT_Init_TypeDef Struct Reference

Initialization structure.

#include <em_pcnt.h>

Data Fields

PCNT_Mode_TypeDef mode
Mode to operate in.
uint32_t counter
Initial counter value (refer to reference manual for max value allowed).
uint32_t top
Initial top value (refer to reference manual for max value allowed).
bool negEdge
Polarity of incoming edge.
bool countDown
Counting direction, only applicable for pcntModeOvsSingle and pcntModeExtSingle modes.
bool filter
Enable filter, only available in pcntModeOvsSingle * mode.
bool hyst
Set to true to enable hysteresis.
bool s1CntDir
Set to true to enable S1 to determine the direction of counting in OVSSINGLE or EXTCLKSINGLE modes.
PCNT_CntEvent_TypeDef cntEvent
Selects whether the regular counter responds to up-count events, down-count events, both, or none.
PCNT_CntEvent_TypeDef auxCntEvent
Selects whether the auxiliary counter responds to up-count events, down-count events, both, or none.
PCNT_PRSSel_TypeDef s0PRS
Select PRS channel as input to S0IN in PCNTx_INPUT register.
PCNT_PRSSel_TypeDef s1PRS
Select PRS channel as input to S1IN in PCNTx_INPUT register.

Initialization structure.

Field Documentation

mode

PCNT_Mode_TypeDef PCNT_Init_TypeDef::mode

Mode to operate in.

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.

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.

negEdge

bool PCNT_Init_TypeDef::negEdge

Polarity of incoming edge.

countDown

bool PCNT_Init_TypeDef::countDown

Counting direction, only applicable for pcntModeOvsSingle and