Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot use PWM on channel 2 if GPIO is enabled on pin 2 #481

@IAmNickNack

Description

@IAmNickNack

On a Pi5, I cannot use PWM on channel 2 if GPIO is also enabled on pin 2.

The confusion appears to be due to how address is used by each provider. PWM uses this property to indicate the channel and GPIO uses the same to indicate the GPIO pin. DefaultRuntimeRegistry then enforces address uniqueness.

The property meaning different things for different provider types appears to conflict with the unique constraint enforced by the registry.

On the Pi5, PWM channel 2 defaults to pin 18. This can't be used as the address because there's no reliable way for the framework to know this without parsing /boot/firmware/config.txt to determine whether or not this is true for the user's specific configuration.

  • If address is the GPIO pin, should it really be a configuration property for PWM?
  • If it is an internal unique identifier, isn't this also implemented by id?

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