2.90.2 PWM_DeadTimeLowSet Function

C

inline static void PWM_DeadTimeLowSet(PWM_GENERATOR genNum,uint16_t deadtimeLow)

Summary

This inline function updates PWM Deadtime low register with the requested value for a specific PWM generator selected by the argument PWM_GENERATOR Enum

Description

Deadtime insertion ensures that there is a gap between turning off one switch and turning on the other in a complementary PWM generator configuration. This function sets the lower portion of the deadtime register.

Precondition

None

Parameters

ParamDescription
genNumPWM generator number
deadtimeLowDeadtime low value

Returns

None

Example

inline static void PWM_DeadTimeLowSet(PWM_GENERATOR genNum,uint16_t deadtimeLow)
{
    switch(genNum) { 
        case PWM_GENERATOR_1:
                PG1DT = (PG1DT & 0xFFFF0000UL) | (deadtimeLow & (uint16_t)0x7FFF);
                break;
        default:break;
    }
}

Remarks

None