ledc_set_duty_and_update requires ledc_fade_func_install
Posted: Tue Mar 16, 2021 1:03 pm
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() 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.