Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
Hi Expert,
want to confirm below due to it's not in example code.
I want to have 3 pwm output with different duty setting. I only want to use 3 channel in LGPT3.
the sysconfig setting is as below.
i can use below to enable 3 channel, right?
PWMTimerLPF3_Object *object = pwm1->object;
object->chNumber = 0;
pwm1 = PWM_open(CONFIG_PWM_0, ¶ms);
if (pwm1 == NULL)
{
/* CONFIG_PWM_0 did not open */
while (1) {}
}
object->chNumber = 1;
pwm11 = PWM_open(CONFIG_PWM_0, ¶ms);
if (pwm11 == NULL)
{
/* CONFIG_PWM_0 did not open */
while (1) {}
}
object->chNumber = 2;
pwm12 = PWM_open(CONFIG_PWM_0, ¶ms);
if (pwm12 == NULL)
{
/* CONFIG_PWM_0 did not open */
while (1) {}
}
object->chNumber = 0;
PWM_start(pwm1);
object->chNumber = 1;
PWM_start(pwm11);
object->chNumber = 2;
PWM_start(pwm12);
object->chNumber = 0;
PWM_setDuty(pwm1, duty);
object->chNumber = 1;
PWM_setDuty(pwm11, duty);
object->chNumber = 2;
PWM_setDuty(pwm12, duty);
But I cannot get it work. So, I think that I may misunderstand something.
BR,
frank