Scicos DemoBoard PWM
Posted: Thu Oct 15, 2009 4:09 am
Hi,
I found some problem on the DemoBoard PWM. The calling function of the PWM \"EE_pwm_set_duty_f\" under flex_daughter_pwm.c\" calls the function via:
EE_pwm_set_duty_f( pin-1 , *duty);
so the chan = pin - 1, in which 0 = 1 in the DemoBoard PWM block under scicos.
However, the chan is define as:
#define EE_PWM_PORT1 1
#define EE_PWM_PORT2 2
in ee_flex_demoboard.h, resulting the \"swith case\" would recognized only 1 channel (recognize channel 1 as 2), while the channel 2 is not recognized.
I think it should be either changing the define chan to:
#define EE_PWM_PORT1 0
#define EE_PWM_PORT2 1
or the pin-1 to pin in the calling function.
Thanks.
Regards,
Chin Luh
I found some problem on the DemoBoard PWM. The calling function of the PWM \"EE_pwm_set_duty_f\" under flex_daughter_pwm.c\" calls the function via:
EE_pwm_set_duty_f( pin-1 , *duty);
so the chan = pin - 1, in which 0 = 1 in the DemoBoard PWM block under scicos.
However, the chan is define as:
#define EE_PWM_PORT1 1
#define EE_PWM_PORT2 2
in ee_flex_demoboard.h, resulting the \"swith case\" would recognized only 1 channel (recognize channel 1 as 2), while the channel 2 is not recognized.
I think it should be either changing the define chan to:
#define EE_PWM_PORT1 0
#define EE_PWM_PORT2 1
or the pin-1 to pin in the calling function.
Thanks.
Regards,
Chin Luh