2.90.3 PWM_DeadTimeSet Function
C
inline static void PWM_DeadTimeSet(PWM_GENERATOR genNum,uint16_t deadtime)
Summary
This inline function updates PWM Deadtime low and high register with the requested value for a specific PWM generator selected by the argument PWM_GENERATOR Enum
Description
This function sets both the low and high portions of the deadtime register, which determines the delay between complementary switching signals.
Precondition
None
Parameters
Param | Description |
---|---|
genNum | PWM generator number |
deadtimeHigh | Deadtime value |
Returns
None
Example
inline static void PWM_DeadTimeSet(PWM_GENERATOR genNum,uint16_t deadtime) { switch(genNum) { case PWM_GENERATOR_1: PG1DT = (((uint32_t)deadtime & (uint16_t)0x7FFF) << 16) | (deadtime & 0x7FFF); break; default:break; } }
Remarks
None