Skip to content

TccPwm::get_max_duty() is -1 too small #911

@fko-kuptec

Description

@fko-kuptec

The maximum duty cycle returned by the Tcc?Pwm peripherals via Pwm::get_max_duty seems to be one too small.

At least when setting exactly this duty cycle, the resulting signal (checked via oscilloscope) is not a fully 100% high signal - it is still interrupted by short spikes to low. However, if I set the returned maximum duty cycle + 1, the resulting signal is actually a duty cycle of 100% - a permanently high signal.

To be honest, I don't really understand the driver code. I didn't spend much time with these peripherals, yet. Therefore, I cannot tell, whether just adding +1 is a good fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions