G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Output channel configuration

Functions

__STATIC_INLINE void DDL_TMR_OC_ConfigOutput (TMR_TypeDef *TMRx, uint32_t Channel, uint32_t Configuration)
 Configure an output channel.
__STATIC_INLINE void DDL_TMR_OC_SetMode (TMR_TypeDef *TMRx, uint32_t Channel, uint32_t Mode)
 Define the behavior of the output reference signal OCxREF from which OCx and OCxN (when relevant) are derived.
__STATIC_INLINE uint32_t DDL_TMR_OC_GetMode (TMR_TypeDef *TMRx, uint32_t Channel)
 Get the output compare mode of an output channel.
__STATIC_INLINE void DDL_TMR_OC_SetPolarity (TMR_TypeDef *TMRx, uint32_t Channel, uint32_t Polarity)
 Set the polarity of an output channel.
__STATIC_INLINE uint32_t DDL_TMR_OC_GetPolarity (TMR_TypeDef *TMRx, uint32_t Channel)
 Get the polarity of an output channel.
__STATIC_INLINE void DDL_TMR_OC_SetIdleState (TMR_TypeDef *TMRx, uint32_t Channel, uint32_t IdleState)
 Set the IDLE state of an output channel.
__STATIC_INLINE uint32_t DDL_TMR_OC_GetIdleState (TMR_TypeDef *TMRx, uint32_t Channel)
 Get the IDLE state of an output channel.
__STATIC_INLINE void DDL_TMR_OC_EnableFast (TMR_TypeDef *TMRx, uint32_t Channel)
 Enable fast mode for the output channel.
__STATIC_INLINE void DDL_TMR_OC_DisableFast (TMR_TypeDef *TMRx, uint32_t Channel)
 Disable fast mode for the output channel.
__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledFast (TMR_TypeDef *TMRx, uint32_t Channel)
 Indicates whether fast mode is enabled for the output channel.
__STATIC_INLINE void DDL_TMR_OC_EnablePreload (TMR_TypeDef *TMRx, uint32_t Channel)
 Enable compare register (TMRx_CCx) preload for the output channel.
__STATIC_INLINE void DDL_TMR_OC_DisablePreload (TMR_TypeDef *TMRx, uint32_t Channel)
 Disable compare register (TMRx_CCx) preload for the output channel.
__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledPreload (TMR_TypeDef *TMRx, uint32_t Channel)
 Indicates whether compare register (TMRx_CCx) preload is enabled for the output channel.
__STATIC_INLINE void DDL_TMR_OC_EnableClear (TMR_TypeDef *TMRx, uint32_t Channel)
 Enable clearing the output channel on an external event.
__STATIC_INLINE void DDL_TMR_OC_DisableClear (TMR_TypeDef *TMRx, uint32_t Channel)
 Disable clearing the output channel on an external event.
__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledClear (TMR_TypeDef *TMRx, uint32_t Channel)
 Indicates clearing the output channel on an external event is enabled for the output channel.
__STATIC_INLINE void DDL_TMR_OC_SetDeadTime (TMR_TypeDef *TMRx, uint32_t DeadTime)
 Set the dead-time delay (delay inserted between the rising edge of the OCxREF signal and the rising edge of the Ocx and OCxN signals).
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH1 (TMR_TypeDef *TMRx, uint32_t CompareValue)
 Set compare value for output channel 1 (TMRx_CC1).
__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH1 (TMR_TypeDef *TMRx)
 Get compare value (TMRx_CC1) set for output channel 1.
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH2 (TMR_TypeDef *TMRx, uint32_t CompareValue)
 Set compare value for output channel 2 (TMRx_CC2).
__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH2 (TMR_TypeDef *TMRx)
 Get compare value (TMRx_CC2) set for output channel 2.
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH3 (TMR_TypeDef *TMRx, uint32_t CompareValue)
 Set compare value for output channel 3 (TMRx_CC3).
__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH3 (TMR_TypeDef *TMRx)
 Get compare value (TMRx_CC3) set for output channel 3.
__STATIC_INLINE void DDL_TMR_OC_SetCompareCH4 (TMR_TypeDef *TMRx, uint32_t CompareValue)
 Set compare value for output channel 4 (TMRx_CC4).
__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH4 (TMR_TypeDef *TMRx)
 Get compare value (TMRx_CC4) set for output channel 4.

Detailed Description

Function Documentation

◆ DDL_TMR_OC_ConfigOutput()

__STATIC_INLINE void DDL_TMR_OC_ConfigOutput ( TMR_TypeDef * TMRx,
uint32_t Channel,
uint32_t Configuration )

Configure an output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
ConfigurationThis parameter must be a combination of all the following values:
Return values
None

Definition at line 1604 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_DisableClear()

__STATIC_INLINE void DDL_TMR_OC_DisableClear ( TMR_TypeDef * TMRx,
uint32_t Channel )

Disable clearing the output channel on an external event.

Note
Macro IS_TMR_OCXREF_CLEAR_INSTANCE(TMRx) can be used to check whether or not a timer instance can clear the OCxREF signal on an external event.
Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1894 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_DisableFast()

__STATIC_INLINE void DDL_TMR_OC_DisableFast ( TMR_TypeDef * TMRx,
uint32_t Channel )

Disable fast mode for the output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1785 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_DisablePreload()

__STATIC_INLINE void DDL_TMR_OC_DisablePreload ( TMR_TypeDef * TMRx,
uint32_t Channel )

Disable compare register (TMRx_CCx) preload for the output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1837 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_EnableClear()

__STATIC_INLINE void DDL_TMR_OC_EnableClear ( TMR_TypeDef * TMRx,
uint32_t Channel )

Enable clearing the output channel on an external event.

Note
This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
Macro IS_TMR_OCXREF_CLEAR_INSTANCE(TMRx) can be used to check whether or not a timer instance can clear the OCxREF signal on an external event.
Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1875 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_EnableFast()

__STATIC_INLINE void DDL_TMR_OC_EnableFast ( TMR_TypeDef * TMRx,
uint32_t Channel )

Enable fast mode for the output channel.

Note
Acts only if the channel is configured in PWM1 or PWM2 mode.
Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1768 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_EnablePreload()

__STATIC_INLINE void DDL_TMR_OC_EnablePreload ( TMR_TypeDef * TMRx,
uint32_t Channel )

Enable compare register (TMRx_CCx) preload for the output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
None

Definition at line 1820 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetCompareCH1()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH1 ( TMR_TypeDef * TMRx)

Get compare value (TMRx_CC1) set for output channel 1.

Note
In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC1_INSTANCE(TMRx) can be used to check whether or not output channel 1 is supported by a timer instance.
Parameters
TMRxTimer instance
Return values
CompareValue(between Min_Data=0 and Max_Data=65535)

Definition at line 1960 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetCompareCH2()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH2 ( TMR_TypeDef * TMRx)

Get compare value (TMRx_CC2) set for output channel 2.

Note
In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC2_INSTANCE(TMRx) can be used to check whether or not output channel 2 is supported by a timer instance.
Parameters
TMRxTimer instance
Return values
CompareValue(between Min_Data=0 and Max_Data=65535)

Definition at line 1987 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetCompareCH3()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH3 ( TMR_TypeDef * TMRx)

Get compare value (TMRx_CC3) set for output channel 3.

Note
In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC3_INSTANCE(TMRx) can be used to check whether or not output channel 3 is supported by a timer instance.
Parameters
TMRxTimer instance
Return values
CompareValue(between Min_Data=0 and Max_Data=65535)

Definition at line 2014 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetCompareCH4()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetCompareCH4 ( TMR_TypeDef * TMRx)

Get compare value (TMRx_CC4) set for output channel 4.

Note
In 32-bit timer implementations returned compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC4_INSTANCE(TMRx) can be used to check whether or not output channel 4 is supported by a timer instance.
Parameters
TMRxTimer instance
Return values
CompareValue(between Min_Data=0 and Max_Data=65535)

Definition at line 2041 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetIdleState()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetIdleState ( TMR_TypeDef * TMRx,
uint32_t Channel )

Get the IDLE state of an output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Returnedvalue can be one of the following values:

Definition at line 1751 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetMode()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetMode ( TMR_TypeDef * TMRx,
uint32_t Channel )

Get the output compare mode of an output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Returnedvalue can be one of the following values:

Definition at line 1660 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_GetPolarity()

__STATIC_INLINE uint32_t DDL_TMR_OC_GetPolarity ( TMR_TypeDef * TMRx,
uint32_t Channel )

Get the polarity of an output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Returnedvalue can be one of the following values:

Definition at line 1704 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_IsEnabledClear()

__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledClear ( TMR_TypeDef * TMRx,
uint32_t Channel )

Indicates clearing the output channel on an external event is enabled for the output channel.

Note
This function enables clearing the output channel on an external event.
This function can only be used in Output compare and PWM modes. It does not work in Forced mode.
Macro IS_TMR_OCXREF_CLEAR_INSTANCE(TMRx) can be used to check whether or not a timer instance can clear the OCxREF signal on an external event.
Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Stateof bit (1 or 0).

Definition at line 1915 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_IsEnabledFast()

__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledFast ( TMR_TypeDef * TMRx,
uint32_t Channel )

Indicates whether fast mode is enabled for the output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Stateof bit (1 or 0).

Definition at line 1802 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_IsEnabledPreload()

__STATIC_INLINE uint32_t DDL_TMR_OC_IsEnabledPreload ( TMR_TypeDef * TMRx,
uint32_t Channel )

Indicates whether compare register (TMRx_CCx) preload is enabled for the output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
Return values
Stateof bit (1 or 0).

Definition at line 1854 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetCompareCH1()

__STATIC_INLINE void DDL_TMR_OC_SetCompareCH1 ( TMR_TypeDef * TMRx,
uint32_t CompareValue )

Set compare value for output channel 1 (TMRx_CC1).

Note
In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC1_INSTANCE(TMRx) can be used to check whether or not output channel 1 is supported by a timer instance.
Parameters
TMRxTimer instance
CompareValuebetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 1947 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetCompareCH2()

__STATIC_INLINE void DDL_TMR_OC_SetCompareCH2 ( TMR_TypeDef * TMRx,
uint32_t CompareValue )

Set compare value for output channel 2 (TMRx_CC2).

Note
In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC2_INSTANCE(TMRx) can be used to check whether or not output channel 2 is supported by a timer instance.
Parameters
TMRxTimer instance
CompareValuebetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 1974 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetCompareCH3()

__STATIC_INLINE void DDL_TMR_OC_SetCompareCH3 ( TMR_TypeDef * TMRx,
uint32_t CompareValue )

Set compare value for output channel 3 (TMRx_CC3).

Note
In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC3_INSTANCE(TMRx) can be used to check whether or not output channel is supported by a timer instance.
Parameters
TMRxTimer instance
CompareValuebetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 2001 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetCompareCH4()

__STATIC_INLINE void DDL_TMR_OC_SetCompareCH4 ( TMR_TypeDef * TMRx,
uint32_t CompareValue )

Set compare value for output channel 4 (TMRx_CC4).

Note
In 32-bit timer implementations compare value can be between 0x00000000 and 0xFFFFFFFF.
Macro IS_TMR_CC4_INSTANCE(TMRx) can be used to check whether or not output channel 4 is supported by a timer instance.
Parameters
TMRxTimer instance
CompareValuebetween Min_Data=0 and Max_Data=65535
Return values
None

Definition at line 2028 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetDeadTime()

__STATIC_INLINE void DDL_TMR_OC_SetDeadTime ( TMR_TypeDef * TMRx,
uint32_t DeadTime )

Set the dead-time delay (delay inserted between the rising edge of the OCxREF signal and the rising edge of the Ocx and OCxN signals).

Note
Macro IS_TMR_BREAK_INSTANCE(TMRx) can be used to check whether or not dead-time insertion feature is supported by a timer instance.
Helper macro __DDL_TMR_CALC_DEADTMRE can be used to calculate the DeadTime parameter
Parameters
TMRxTimer instance
DeadTimebetween Min_Data=0 and Max_Data=255
Return values
None

Definition at line 1933 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetIdleState()

__STATIC_INLINE void DDL_TMR_OC_SetIdleState ( TMR_TypeDef * TMRx,
uint32_t Channel,
uint32_t IdleState )

Set the IDLE state of an output channel.

Note
This function is significant only for the timer instances supporting the break feature. Macro IS_TMR_BREAK_INSTANCE(TMRx) can be used to check whether or not a timer instance provides a break input.
Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
IdleStateThis parameter can be one of the following values:
Return values
None

Definition at line 1730 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetMode()

__STATIC_INLINE void DDL_TMR_OC_SetMode ( TMR_TypeDef * TMRx,
uint32_t Channel,
uint32_t Mode )

Define the behavior of the output reference signal OCxREF from which OCx and OCxN (when relevant) are derived.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
ModeThis parameter can be one of the following values:
Return values
None

Definition at line 1635 of file g32r4xx_ddl_tmr.h.

◆ DDL_TMR_OC_SetPolarity()

__STATIC_INLINE void DDL_TMR_OC_SetPolarity ( TMR_TypeDef * TMRx,
uint32_t Channel,
uint32_t Polarity )

Set the polarity of an output channel.

Parameters
TMRxTimer instance
ChannelThis parameter can be one of the following values:
PolarityThis parameter can be one of the following values:
Return values
None

Definition at line 1683 of file g32r4xx_ddl_tmr.h.