G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Counter clock selection

Functions

__STATIC_INLINE void DDL_TMR_EnableExternalClock (TMR_TypeDef *TMRx)
 Enable external clock mode 2.
__STATIC_INLINE void DDL_TMR_DisableExternalClock (TMR_TypeDef *TMRx)
 Disable external clock mode 2.
__STATIC_INLINE uint32_t DDL_TMR_IsEnabledExternalClock (TMR_TypeDef *TMRx)
 Indicate whether external clock mode 2 is enabled.
__STATIC_INLINE void DDL_TMR_SetClockSource (TMR_TypeDef *TMRx, uint32_t ClockSource)
 Set the clock source of the counter clock.
__STATIC_INLINE void DDL_TMR_SetEncoderMode (TMR_TypeDef *TMRx, uint32_t EncoderMode)
 Set the encoder interface mode.

Detailed Description

Function Documentation

◆ DDL_TMR_DisableExternalClock()

__STATIC_INLINE void DDL_TMR_DisableExternalClock ( TMR_TypeDef * TMRx)

Disable external clock mode 2.

Note
Macro IS_TMR_CLOCKSOURCE_ETRMODE2_INSTANCE(TMRx) can be used to check whether or not a timer instance supports external clock mode2.
Parameters
TMRxTimer instance
Return values
None

Definition at line 2386 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_EnableExternalClock()

__STATIC_INLINE void DDL_TMR_EnableExternalClock ( TMR_TypeDef * TMRx)

Enable external clock mode 2.

Note
When external clock mode 2 is enabled the counter is clocked by any active edge on the ETRF signal.
Macro IS_TMR_CLOCKSOURCE_ETRMODE2_INSTANCE(TMRx) can be used to check whether or not a timer instance supports external clock mode2.
Parameters
TMRxTimer instance
Return values
None

Definition at line 2374 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_IsEnabledExternalClock()

__STATIC_INLINE uint32_t DDL_TMR_IsEnabledExternalClock ( TMR_TypeDef * TMRx)

Indicate whether external clock mode 2 is enabled.

Note
Macro IS_TMR_CLOCKSOURCE_ETRMODE2_INSTANCE(TMRx) can be used to check whether or not a timer instance supports external clock mode2.
Parameters
TMRxTimer instance
Return values
Stateof bit (1 or 0).

Definition at line 2398 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_SetClockSource()

__STATIC_INLINE void DDL_TMR_SetClockSource ( TMR_TypeDef * TMRx,
uint32_t ClockSource )

Set the clock source of the counter clock.

Note
when selected clock source is external clock mode 1, the timer input the external clock is applied is selected by calling the DDL_TMR_SetTriggerInput() function. This timer input must be configured by calling the DDL_TMR_IC_Config() function.
Macro IS_TMR_CLOCKSOURCE_ETRMODE1_INSTANCE(TMRx) can be used to check whether or not a timer instance supports external clock mode1.
Macro IS_TMR_CLOCKSOURCE_ETRMODE2_INSTANCE(TMRx) can be used to check whether or not a timer instance supports external clock mode2.
Parameters
TMRxTimer instance
ClockSourceThis parameter can be one of the following values:
Return values
None

Definition at line 2420 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_SetEncoderMode()

__STATIC_INLINE void DDL_TMR_SetEncoderMode ( TMR_TypeDef * TMRx,
uint32_t EncoderMode )

Set the encoder interface mode.

Note
Macro IS_TMR_ENCODER_INTERFACE_INSTANCE(TMRx) can be used to check whether or not a timer instance supports the encoder mode.
Parameters
TMRxTimer instance
EncoderModeThis parameter can be one of the following values:
Return values
None

Definition at line 2436 of file g32r4xx_ddl_tmr.h.