And when I set my dutycycle to 25% the led behaves like its set at 75% dutycycle ( its brighter)
PWM duty cycle 25% - LED brightness 75%
PWM duty cycle 75% - LED brightness 25%
I've listed my config below.. Can you please explain whats is wrong or is it supposed to work like this.
Code: Select all
static PWMConfig pwmcfg = {
100000,
1000,
pwmpcb,
{
{PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb},
{PWM_OUTPUT_DISABLED, NULL},
{PWM_OUTPUT_DISABLED, NULL},
{PWM_OUTPUT_DISABLED, NULL}
},
pwmEnableChannel(&PWMD1, 0, PWM_PERCENTAGE_TO_WIDTH(&PWMD1, 2500));
Thanks in Advance