-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
MCPWM ESP32-S3 Function: mcpwm_set_duty_in_us (IDFGH-8151) #9648
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Comments
github-actions
bot
changed the title
MCPWM ESP32-S3 Function: mcpwm_set_duty_in_us
MCPWM ESP32-S3 Function: mcpwm_set_duty_in_us (IDFGH-8151)
Aug 26, 2022
espressif-bot
added
Status: In Progress
Work is in progress
and removed
Status: Opened
Issue is new
labels
Aug 29, 2022
@misiek1994 Nice catch, I can also confirm this is a multiplication overflow. We should use |
espressif-bot
added
Status: Reviewing
Issue is being reviewed
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Resolution: Done
Issue is done internally
and removed
Status: In Progress
Work is in progress
Status: Reviewing
Issue is being reviewed
Resolution: NA
Issue resolution is unavailable
labels
Aug 30, 2022
espressif-bot
pushed a commit
that referenced
this issue
Sep 3, 2022
Jason2866
added a commit
to Jason2866/esp-idf
that referenced
this issue
Sep 3, 2022
* timer: propagate isr register failure Closes espressif#9651 * mcpwm: fix multiplication overflow in converting us to compare ticks Closes espressif#9648 * heap: remove misleading info about malloc being equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT) The actual memory allocated for malloc() depends on a lot of factors, see heap_caps_malloc_default() Closes espressif#7659 * esp-rom: fixed error in miniz header documention for tdefl_init Closes espressif#8435 * temperature_sensor: Fix issue that value is not accurate on ESP32-S3 * esp_https_ota: fix bug where `http_client_init_cb` is called after `esp_http_client_perform()` instead of before. Closes espressif#9581 * Tasmota changes * Fix linker error for C3 * Avoid bootloop if chip is unknown In case the PSIRAM chip is unknown, return an error and disable PSRAM instead of calling abort() and causing a bootloop * Support for xiaomi single core ESP32 * Fix linker error for rom_temp_to_power * fix linker error r_lld_ext_adv_dynamic_aux_pti_process * Hide download percent when not interactive * list(APPEND esptool_elf2image_args --dont-append-digest) * Use native Apple ARM toolchains * add package.json * add submodules * 8575d75 Co-authored-by: morris <[email protected]> Co-authored-by: Marius Vikhammer <[email protected]> Co-authored-by: Cao Sen Miao <[email protected]> Co-authored-by: Harshit Malpani <[email protected]> Co-authored-by: Mahavir Jain <[email protected]>
Jason2866
added a commit
to Jason2866/esp-idf
that referenced
this issue
Sep 3, 2022
* timer: propagate isr register failure Closes espressif#9651 * mcpwm: fix multiplication overflow in converting us to compare ticks Closes espressif#9648 * heap: remove misleading info about malloc being equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT) The actual memory allocated for malloc() depends on a lot of factors, see heap_caps_malloc_default() Closes espressif#7659 * esp-rom: fixed error in miniz header documention for tdefl_init Closes espressif#8435 * temperature_sensor: Fix issue that value is not accurate on ESP32-S3 * esp_https_ota: fix bug where `http_client_init_cb` is called after `esp_http_client_perform()` instead of before. Closes espressif#9581 * Tasmota changes * Fix linker error for C3 * Avoid bootloop if chip is unknown In case the PSIRAM chip is unknown, return an error and disable PSRAM instead of calling abort() and causing a bootloop * Support for xiaomi single core ESP32 * Fix linker error for rom_temp_to_power * fix linker error r_lld_ext_adv_dynamic_aux_pti_process * Hide download percent when not interactive * list(APPEND esptool_elf2image_args --dont-append-digest) * Use native Apple ARM toolchains * add package.json * add submodules * 8575d75 * Arduino tinyusb v0.14.0 stripped Co-authored-by: morris <[email protected]> Co-authored-by: Marius Vikhammer <[email protected]> Co-authored-by: Cao Sen Miao <[email protected]> Co-authored-by: Harshit Malpani <[email protected]> Co-authored-by: Mahavir Jain <[email protected]>
espressif-bot
pushed a commit
that referenced
this issue
Sep 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Resolution: Done
Issue is done internally
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
4.4.2
Operating System used.
Linux
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
No response
What is the expected behavior?
Function: mcpwm_set_duty_in_us should set pwm duty to specific value in us.
What is the actual behavior?
mcpwm_set_duty_in_us is not setting properly pwm.
Steps to reproduce.
Build or installation Logs.
No response
More Information.
In function:
Probably overflow in line: mcpwm_ll_operator_set_compare_value(hal->dev, op, cmp, duty_in_us * real_timer_clk_hz / 1000000);
Changing to: mcpwm_ll_operator_set_compare_value(hal->dev, op, cmp, real_timer_clk_hz / 1000000 * duty_in_us); fixed the problem, but there might be another when real_timer_clk_hz is not multiplication of 1MHz.
The text was updated successfully, but these errors were encountered: