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

[FEATURE] Centre ESP32 LEDC PWM, add dead time and 6-PWM support #273

Closed
runger1101001 opened this issue May 21, 2023 · 1 comment · Fixed by #414
Closed

[FEATURE] Centre ESP32 LEDC PWM, add dead time and 6-PWM support #273

runger1101001 opened this issue May 21, 2023 · 1 comment · Fixed by #414
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@runger1101001
Copy link
Member

Looks like LEDC actually allows setting a centre-aligned PWM. See the ledc_timer_config_t field hpoint field, which defines the point at which the PWM switches on. By setting both duty cycle and hpoint we can centre the signal.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#_CPPv421ledc_channel_config_t

See also ledc_set_duty_and_update()

If we can centre the signal, we can also introduce dead-time. We have to consider if this can be done in a safe manner, since the channels are not actually complementary. But it should in the end not be different to the software dead-time of the other drivers.

@runger1101001 runger1101001 added the enhancement New feature or request label May 21, 2023
@runger1101001 runger1101001 self-assigned this May 21, 2023
@askuric askuric linked a pull request Jun 22, 2024 that will close this issue
@askuric
Copy link
Member

askuric commented Jul 22, 2024

Done in v2.3.4

@askuric askuric closed this as completed Jul 22, 2024
@runger1101001 runger1101001 added this to the 2.3.4_Release milestone Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants