Hi all, I've been trying to setup a PWM output. It is copied from the example which works. All i did was change the pins, but it doesn't seems to work, at all. can't think of any reason why it is going wrong. below is part of the code.
ROM_SysCtlPWMClockSet(SYSCTL_PWMDIV_64); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0); ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC); ROM_GPIOPinTypePWM(GPIO_PORTC_BASE, GPIO_PIN_4); ROM_GPIOPinConfigure(GPIO_PC4_M0PWM6); ui32PWMClock = SysCtlClockGet() / 64; ui32Load = (ui32PWMClock / PWM_FREQUENCY) - 1; PWMGenConfigure(PWM0_BASE, PWM_GEN_0, PWM_GEN_MODE_DOWN); PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, ui32Load); ROM_PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, ui8Adjust * ui32Load / 1000); ROM_PWMOutputState(PWM0_BASE, PWM_OUT_0_BIT, true); ROM_PWMGenEnable(PWM0_BASE, PWM_GEN_0);