Looking at the mcpwm documentation: https://docs.espressif.com/projects/esp ... mcpwm.html
I found a mistake or missleading information on several functions that have mcpwm_generator_t as parameter, such as: mcpwm_get_duty(mcpwm_unit_t , mcpwm_timer_t, mcpwm_operator_t)
The explanation of the parameter says:
"gen: set the generator(MCPWMXA/MCPWMXB), ‘x’ is operator number selected"
while in fact the values of gen should be MCPWM_GEN_A or MCPWM_GEN_B
Regards Federico
mcpwm: Documentation mistake
Re: mcpwm: Documentation mistake
I am not sure if the constants are different using Arduino framework but MCPWM_GEN_A isn't defined for me.
It looks like the correct constant is "MCPWM_OPR_A" and "MCPWM_OPR_B"
It looks like the correct constant is "MCPWM_OPR_A" and "MCPWM_OPR_B"
Who is online
Users browsing this forum: No registered users and 35 guests