Hi All
ledc_set_duty_and_update() always fails unless ledc_fade_func_install() has been called as part of the LEDC configuration.
The separate (non-thread-safe) functions ledc_set_duty() and ledc_update_duty() work fine without ledc_fade_func_install()
I couldn't find this mentioned in the documentation. As I didn't need the fade functionality, I didn't include that call when moving from the LEDC example to integrating into my current project.
I've just lost a whole morning to this, so posting in case it saves someone else some time.
ESP-IDF v4.2 using CMAKE.
ledc_set_duty_and_update requires ledc_fade_func_install
-
- Posts: 8
- Joined: Mon Nov 30, 2020 10:52 am
Re: ledc_set_duty_and_update requires ledc_fade_func_install
Thank you StevePeake, you saved the day.
I guess I will stay with thread "unsafe" code at the moment for cleaner code sake.
I guess I will stay with thread "unsafe" code at the moment for cleaner code sake.
Who is online
Users browsing this forum: No registered users and 98 guests