Initialization structure.
Public Attributes#
Mode to operate in.
Initial counter value (refer to reference manual for max value allowed).
Initial top value (refer to reference manual for max value allowed).
Polarity of incoming edge.
Counting direction, only applicable for pcntModeOvsSingle and pcntModeExtSingle modes.
Enable filter, only available in pcntModeOvsSingle* mode.
Enable/disable PCNT counting during debug halt.
Set to true to enable hysteresis.
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.
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.
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.
260
of file platform/emlib/inc/em_pcnt.h
negEdge#
bool PCNT_Init_TypeDef::negEdge
Polarity of incoming edge.
pcntModeExtSingle mode - if false, positive edges are counted, otherwise negative edges.
pcntModeExtQuad mode - if true, counting direction is inverted.
266
of file platform/emlib/inc/em_pcnt.h
countDown#
bool PCNT_Init_TypeDef::countDown
Counting direction, only applicable for pcntModeOvsSingle and pcntModeExtSingle modes.
270
of file platform/emlib/inc/em_pcnt.h
filter#
bool PCNT_Init_TypeDef::filter
Enable filter, only available in pcntModeOvsSingle* mode.
273
of file platform/emlib/inc/em_pcnt.h
debugHalt#
bool PCNT_Init_TypeDef::debugHalt
Enable/disable PCNT counting during debug halt.
Only in OVSSINGLE and OVSQUAD modes.
277
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.
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.
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.
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.
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.
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.
311
of file platform/emlib/inc/em_pcnt.h