Page 1 of 1

LED PWM control - resume after ledc_stop?

Posted: Mon Jul 03, 2017 4:58 pm
by samsam
Hello,
2 quick qestions about LEDC PWM control :
- don't see a function to resume PWM after executing:
ledc_stop(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t idle_level)
what will be the procedure to resume the LED PWM?
- ledc_stop(..) - does it stops and the associated timer or the timer need to be stopped with ledc_timer_pause(..)?
Thanks

Re: LED PWM control - resume after ledc_stop?

Posted: Tue Jul 04, 2017 4:29 pm
by samsam
After spent some time browsing driver/ledc.c, I saw that ledc_update_duty(LED_SPEED_MODE, LED_PWM_CHANNEL) has almost all the opposite operations of ledc_stop(LED_SPEED_MODE, LED_PWM_CHANNEL), so I tried and it works Ok so far :)
Also used ledc_timer_pause(..) after ledc_stop(..) and resp. ledc_timer_resume(..) before ledc_update_duty(..)