-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ledc.c: Fix frequency calculation. (IDFGH-10569) #11810
Conversation
ledc.c: Fix frequency calculation. Round int instead of truncate.
The same rounding technique can see in esp-idf/components/driver/ledc/ledc.c Lines 334 to 338 in cf7e743
|
What does it mean? I can't find this sha. |
It look like we need to merge into v5.0-beta1 |
By this, we're asking the bot to sync the PR int our internal Gitlab server. We will merge this PR to the master first and later will backport to 5.1 and 5.0 |
Helper function to calculate the maximum possible LEDC duty resolution in bits for ledc_timer_config()
@suda-morris |
@IhorNehrutsa The fix has been merged into master (it might take a while to sync to Github). Backports to release/v5.1 and release/v5.0 will be done soon. |
ledc.c: Fix frequency calculation. Round int instead of truncate. Merges #11810
ledc.c: Fix frequency calculation. Round int instead of truncate. Merges #11810
@suda-morris, @songruo |
ledc.c: Fix frequency calculation. Round int instead of truncate. Merges #11810
Hi, @songruo, @suda-morris. |
Helper function to find the maximum possible duty resolution in bits for ledc_timer_config() Merges #11810
hi @IhorNehrutsa Sorry for the late response. It's merged in 9ced546 |
Still absent in the release/v5.1 and release/v5.0 |
Helper function to find the maximum possible duty resolution in bits for ledc_timer_config() Merges espressif#11810
Are there any chances of getting this PR in release/v5.1 and release/v5.0 branches? |
@IhorNehrutsa |
@songruo Thanks for the fast answer. Please apply it to release/v5.1 and make a new tag v5.1.3 |
Round int instead of truncate.
ledc_get_freq() returns value 2Hz when the actual 3Hz was setted (Tested with oscilloscope).
Add ledc_calc_duty_resolution() -
Helper function to calculate the maximum possible LEDC duty resolution in bits for ledc_timer_config()