Skip to content
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

ESP-IDF doc : mcpwm_cache_enable documentation misleading (IDFGH-3000) #5032

Closed
vortex314 opened this issue Mar 30, 2020 · 2 comments
Closed
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@vortex314
Copy link

ESP-IDF documentation on mcpwm_capture_enable seems to suggest that the parmeter num_of_pulse is a 32 bit value. However the underlying register PWM_CAP_CH0_CFG_REG has only 8 bit's for the prescaling. So any value above 255 will give unexpected results.
Also there is an offset by 1 to take into account.

esp_err_t mcpwm_capture_enable(mcpwm_unit_tmcpwm_num, mcpwm_capture_signal_tcap_sig, mcpwm_capture_on_edge_tcap_edge, uint32_t num_of_pulse)

Hope this helps somebody with the same issues.

@github-actions github-actions bot changed the title ESP-IDF doc : mcpwm_cache_enable documentation misleading ESP-IDF doc : mcpwm_cache_enable documentation misleading (IDFGH-3000) Mar 30, 2020
@Alvin1Zhang
Copy link
Collaborator

@vortex314 Thanks for reporting, we will look into and provide feedback.

@Alvin1Zhang
Copy link
Collaborator

@vortex314 Thanks for reporting, we will fix the issue. Thanks. @koobest

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Done Issue is done internally labels May 16, 2021
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
Projects
None yet
Development

No branches or pull requests

3 participants