PWM dimming, from high duty cycle to low duty cycle(80%---50%), the human eye feels that the light will flash a few times

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

PWM dimming, from high duty cycle to low duty cycle(80%---50%), the human eye feels that the light will flash a few times

1,999 次查看
yuboli
Contributor II

PWM dimming, from high duty cycle to low duty cycle(80%---50%), the human eye feels that the light will flash a few times

My pwm dimming program is

vAHI_TimerEnable(E_AHI_TIMER_1, 2, FALSE, FALSE, TRUE);

vAHI_TimerConfigureOutputs(E_AHI_TIMER_1, TRUE, TRUE); /* Invert PWM and disable gating */
vAHI_TimerClockSelect(E_AHI_TIMER_1, FALSE, TRUE);

vAHI_TimerStartRepeat(E_AHI_TIMER_1,Level_Value,4000000/477);

When I change the Level_Value value, the duty cycle will change.But the light flash a few times

0 项奖励
回复
5 回复数

1,794 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

 

Could you please tell me which board are you working on?

 

Also, I'd like you to explain in detail your issue so I can replicate it and give you a better support.

 

Best regards,

Felipe

0 项奖励
回复

1,794 次查看
yuboli
Contributor II

hi Felipe Garcia,

I use the JN-AN-1218-Zigbee-3-0-Light-Bulb project, compile options select DimmableLight, GpProxy, JN5169, DR1175.But the process of adjusting the duty cycle, the bulb will flash a few times;The duty cycle is correct, but I don’t know why.

My pwm dimming program is

vAHI_TimerEnable(E_AHI_TIMER_1, 2, FALSE, FALSE, TRUE);

vAHI_TimerConfigureOutputs(E_AHI_TIMER_1, TRUE, TRUE); /* Invert PWM and disable gating */
vAHI_TimerClockSelect(E_AHI_TIMER_1, FALSE, TRUE);

vAHI_TimerStartRepeat(E_AHI_TIMER_1,Level_Value,4000000/477);

0 项奖励
回复

1,794 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

 

Sorry for my late reply.

 

Could you please try adding a delay before StartRepeat?

 

Also, could you please provide the DIO pin you are using?

 

Regards,

Felipe

0 项奖励
回复

1,794 次查看
yuboli
Contributor II

hi  Felipe Garcia

   I adjust the duty cycle process, there is a time gradual process, the time is about 3s; why does it look like a few times when the brightness is low? My minimum gradient is 1;pastedImage_1.png

0 项奖励
回复

1,794 次查看
FelipeGarcia
NXP Employee
NXP Employee

Hi Daniel,

 

I tested this on my side and I couldn’t see this behavior. I changed the duty cycle from around 50 to 90% and the LED didn’t blink.

 

From what I understand, when you change the duty cycle, the LED blinks a few times before the duty cycle is updated. The PWM is working fine but there are some flashes at the beginning of the process.

 

Am I correct?

 

Best regards,

Felipe

0 项奖励
回复