Skip to content

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

Closed

Description

@runger1101001

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.

Activity

  1. askuric commented on Jul 22, 2024

    @askuric
    Member

    Done in v2.3.4

  2. added this to the 2.3.4_Release milestone on Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions