G32R430 Device Driver Layer v1.0.4
G32R4xx Device Driver Layer API Reference
Initialisation and deinitialisation functions

Functions

ErrorStatus DDL_TMR_DeInit (TMR_TypeDef *TMRx)
 Set TMRx registers to their reset values.
void DDL_TMR_StructInit (DDL_TMR_InitTypeDef *TMR_InitStruct)
 Set the fields of the time base unit configuration data structure to their default values.
ErrorStatus DDL_TMR_Init (TMR_TypeDef *TMRx, DDL_TMR_InitTypeDef *TMR_InitStruct)
 Configure the TMRx time base unit.
void DDL_TMR_OC_StructInit (DDL_TMR_OC_InitTypeDef *TMR_OC_InitStruct)
 Set the fields of the TMRx output channel configuration data structure to their default values.
ErrorStatus DDL_TMR_OC_Init (TMR_TypeDef *TMRx, uint32_t Channel, DDL_TMR_OC_InitTypeDef *TMR_OC_InitStruct)
 Configure the TMRx output channel.
void DDL_TMR_IC_StructInit (DDL_TMR_IC_InitTypeDef *TMR_ICInitStruct)
 Set the fields of the TMRx input channel configuration data structure to their default values.
ErrorStatus DDL_TMR_IC_Init (TMR_TypeDef *TMRx, uint32_t Channel, DDL_TMR_IC_InitTypeDef *TMR_IC_InitStruct)
 Configure the TMRx input channel.
void DDL_TMR_ENCODER_StructInit (DDL_TMR_ENCODER_InitTypeDef *TMR_EncoderInitStruct)
 Fills each TMR_EncoderInitStruct field with its default value.
ErrorStatus DDL_TMR_ENCODER_Init (TMR_TypeDef *TMRx, DDL_TMR_ENCODER_InitTypeDef *TMR_EncoderInitStruct)
 Configure the encoder interface of the timer instance.
void DDL_TMR_HALLSENSOR_StructInit (DDL_TMR_HALLSENSOR_InitTypeDef *TMR_HallSensorInitStruct)
 Set the fields of the TMRx Hall sensor interface configuration data structure to their default values.
ErrorStatus DDL_TMR_HALLSENSOR_Init (TMR_TypeDef *TMRx, DDL_TMR_HALLSENSOR_InitTypeDef *TMR_HallSensorInitStruct)
 Configure the Hall sensor interface of the timer instance.
void DDL_TMR_BDT_StructInit (DDL_TMR_BDT_InitTypeDef *TMR_BDTInitStruct)
 Set the fields of the Break and Dead Time configuration data structure to their default values.
ErrorStatus DDL_TMR_BDT_Init (TMR_TypeDef *TMRx, DDL_TMR_BDT_InitTypeDef *TMR_BDTInitStruct)
 Configure the Break and Dead Time feature of the timer instance.

Detailed Description

Function Documentation

◆ DDL_TMR_BDT_Init()

ErrorStatus DDL_TMR_BDT_Init ( TMR_TypeDef * TMRx,
DDL_TMR_BDT_InitTypeDef * TMR_BDTInitStruct )

Configure the Break and Dead Time feature of the timer instance.

Note
As the bits AOE, BKP, BKE, OSSR, OSSI and DTG[7:0] can be write-locked depending on the LOCK configuration, it can be necessary to configure all of them during the first write access to the TMRx_BDTR register.
Macro IS_TMR_BREAK_INSTANCE(TMRx) can be used to check whether or not a timer instance provides a break input.
Parameters
TMRxTimer Instance
TMR_BDTInitStructpointer to a DDL_TMR_BDT_InitTypeDef structure (Break and Dead Time configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: Break and Dead Time is initialized
  • ERROR: not applicable

Definition at line 648 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_BDT_StructInit()

void DDL_TMR_BDT_StructInit ( DDL_TMR_BDT_InitTypeDef * TMR_BDTInitStruct)

Set the fields of the Break and Dead Time configuration data structure to their default values.

Parameters
TMR_BDTInitStructpointer to a DDL_TMR_BDT_InitTypeDef structure (Break and Dead Time configuration data structure)
Return values
None

Definition at line 622 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_DeInit()

ErrorStatus DDL_TMR_DeInit ( TMR_TypeDef * TMRx)

Set TMRx registers to their reset values.

Parameters
TMRxTimer instance
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx registers are de-initialized
  • ERROR: invalid TMRx instance

Definition at line 193 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_ENCODER_Init()

ErrorStatus DDL_TMR_ENCODER_Init ( TMR_TypeDef * TMRx,
DDL_TMR_ENCODER_InitTypeDef * TMR_EncoderInitStruct )

Configure the encoder interface of the timer instance.

Parameters
TMRxTimer Instance
TMR_EncoderInitStructpointer to a DDL_TMR_ENCODER_InitTypeDef structure (TMRx encoder interface configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx registers are initialized
  • ERROR: not applicable

Definition at line 450 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_ENCODER_StructInit()

void DDL_TMR_ENCODER_StructInit ( DDL_TMR_ENCODER_InitTypeDef * TMR_EncoderInitStruct)

Fills each TMR_EncoderInitStruct field with its default value.

Parameters
TMR_EncoderInitStructpointer to a DDL_TMR_ENCODER_InitTypeDef structure (encoder interface configuration data structure)
Return values
None

Definition at line 427 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_HALLSENSOR_Init()

ErrorStatus DDL_TMR_HALLSENSOR_Init ( TMR_TypeDef * TMRx,
DDL_TMR_HALLSENSOR_InitTypeDef * TMR_HallSensorInitStruct )

Configure the Hall sensor interface of the timer instance.

Note
TMRx CH1, CH2 and CH3 inputs connected through a XOR to the TI1 input channel
TMRx slave mode controller is configured in reset mode. Selected internal trigger is TI1F_ED.
Channel 1 is configured as input, IC1 is mapped on TRC.
Captured value stored in TMRx_CCR1 correspond to the time elapsed between 2 changes on the inputs. It gives information about motor speed.
Channel 2 is configured in output PWM 2 mode.
Compare value stored in TMRx_CCR2 corresponds to the commutation delay.
OC2REF is selected as trigger output on TRGO.
DDL_TMR_IC_POLARITY_BOTHEDGE must not be used for TI1 when it is used when TMRx operates in Hall sensor interface mode.
Parameters
TMRxTimer Instance
TMR_HallSensorInitStructpointer to a DDL_TMR_HALLSENSOR_InitTypeDef structure (TMRx DALL sensor interface configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx registers are de-initialized
  • ERROR: not applicable

Definition at line 543 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_HALLSENSOR_StructInit()

void DDL_TMR_HALLSENSOR_StructInit ( DDL_TMR_HALLSENSOR_InitTypeDef * TMR_HallSensorInitStruct)

Set the fields of the TMRx Hall sensor interface configuration data structure to their default values.

Parameters
TMR_HallSensorInitStructpointer to a DDL_TMR_HALLSENSOR_InitTypeDef structure (HALL sensor interface configuration data structure)
Return values
None

Definition at line 513 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_IC_Init()

ErrorStatus DDL_TMR_IC_Init ( TMR_TypeDef * TMRx,
uint32_t Channel,
DDL_TMR_IC_InitTypeDef * TMR_IC_InitStruct )

Configure the TMRx input channel.

Parameters
TMRxTimer Instance
ChannelThis parameter can be one of the following values:
TMR_IC_InitStructpointer to a DDL_TMR_IC_InitTypeDef structure (TMRx input channel configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx output channel is initialized
  • ERROR: TMRx output channel is not initialized

Definition at line 396 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_IC_StructInit()

void DDL_TMR_IC_StructInit ( DDL_TMR_IC_InitTypeDef * TMR_ICInitStruct)

Set the fields of the TMRx input channel configuration data structure to their default values.

Parameters
TMR_ICInitStructpointer to a DDL_TMR_IC_InitTypeDef structure (the input channel configuration data structure)
Return values
None

Definition at line 373 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_Init()

ErrorStatus DDL_TMR_Init ( TMR_TypeDef * TMRx,
DDL_TMR_InitTypeDef * TMR_InitStruct )

Configure the TMRx time base unit.

Parameters
TMRxTimer Instance
TMR_InitStructpointer to a DDL_TMR_InitTypeDef structure (TMRx time base unit configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx registers are de-initialized
  • ERROR: not applicable

Definition at line 262 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_OC_Init()

ErrorStatus DDL_TMR_OC_Init ( TMR_TypeDef * TMRx,
uint32_t Channel,
DDL_TMR_OC_InitTypeDef * TMR_OC_InitStruct )

Configure the TMRx output channel.

Parameters
TMRxTimer Instance
ChannelThis parameter can be one of the following values:
TMR_OC_InitStructpointer to a DDL_TMR_OC_InitTypeDef structure (TMRx output channel configuration data structure)
Return values
AnErrorStatus enumeration value:
  • SUCCESS: TMRx output channel is initialized
  • ERROR: TMRx output channel is not initialized

Definition at line 341 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_OC_StructInit()

void DDL_TMR_OC_StructInit ( DDL_TMR_OC_InitTypeDef * TMR_OC_InitStruct)

Set the fields of the TMRx output channel configuration data structure to their default values.

Parameters
TMR_OC_InitStructpointer to a DDL_TMR_OC_InitTypeDef structure (the output channel configuration data structure)
Return values
None

Definition at line 314 of file g32r4xx_ddl_tmr.c.

◆ DDL_TMR_StructInit()

void DDL_TMR_StructInit ( DDL_TMR_InitTypeDef * TMR_InitStruct)

Set the fields of the time base unit configuration data structure to their default values.

Parameters
TMR_InitStructpointer to a DDL_TMR_InitTypeDef structure (time base unit configuration data structure)
Return values
None

Definition at line 243 of file g32r4xx_ddl_tmr.c.