This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PWM Deadband strange behaviour

Greetings, im using a TM4C123GXL launchpad and I have a little problem in my PWM code. I'm configuring the PWM and i have it working, the problem is, when i place the PWMDeadbandEnable, the PWM value stay's on when it should be off.

void ConfigPWMPorts (void) {
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF);
SysCtlPWMClockSet(SYSCTL_PWMDIV_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM1); //The Tiva Launchpad has two modules (0 and 1). Module 1 covers the LED pins
ulPeriod = SysCtlClockGet() / 8340; //PWM frequency 10kHz
GPIOPinConfigure(GPIO_PF2_M1PWM6);
GPIOPinConfigure(GPIO_PF3_M1PWM7);
GPIOPinTypePWM(GPIO_PORTF_BASE, GPIO_PIN_2 | GPIO_PIN_3);
PWMGenConfigure(PWM1_BASE, PWM_GEN_3, PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_GEN_SYNC_LOCAL);
PWMGenPeriodSet(PWM1_BASE, PWM_GEN_3, ulPeriod);
PWMPulseWidthSet(PWM1_BASE, PWM_OUT_6,0);
PWMPulseWidthSet(PWM1_BASE, PWM_OUT_7,0);
PWMOutputInvert(PWM1_BASE, PWM_OUT_7_BIT, false);
PWMOutputInvert(PWM1_BASE, PWM_OUT_6_BIT, false);
PWMOutputState(PWM1_BASE, PWM_OUT_6_BIT | PWM_OUT_7_BIT, true);
PWMGenEnable(PWM1_BASE, PWM_GEN_3);
//PWMDeadBandEnable(PWM1_BASE, PWM_GEN_3, 100, 100);
}

if condition{

PWMOutputInvert(PWM1_BASE, PWM_OUT_7_BIT, false);
PWMPulseWidthSet(PWM1_BASE, PWM_OUT_6, ulPeriod); // PWM Period Set
PWMPulseWidthSet(PWM1_BASE, PWM_OUT_7, ulPeriod);

}

This condition is, if its true, keeps both PWM_OUT at same state and not changing, else, generate and place the deadband.

Well at least it should be, but what's happening is that if i uncoment the PWMDeadBandEnable, because i suppose it stays configured, the PWM goes to High on one port