Skip to content

ESP32, PWM channel issues #6275

@p1ng0o

Description

@p1ng0o

Seems the ESP32 use the same channel for all pwms.

>>> import machine
>>> pw1 = machine.PWM(machine.Pin(0))
>>> pw2 = machine.PWM(machine.Pin(14))
>>> print(pw1, pw2)
PWM(0, freq=5000, duty=512) PWM(14, freq=5000, duty=512)
>>> pw1.freq(1000)
>>> print(pw1, pw2)
PWM(0, freq=1000, duty=512) PWM(14, freq=1000, duty=512)

Reading the pwm code for the esp32 port, it should use instead a map of an available channel per pin.

esp32spiram-idf3-20200722-unstable-v1.12-652-gcaaaa2b1f.bin

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy