Skip to content

PWM does not work on pins needing pin remapping #4

Description

@maxgerhardt

the PWM class / timer functionality seems to have a problem if the output pin requires a function remap. e.g.,

  • PB4 with TIMER2_CH0 - GPIO_TIMER2_PARTIAL_REMAP does not work (no PWM wave visible on pin)
  • PA6, TIMER2_CH0 - Default does work

Test code

#include <Arduino.h>
PWM pwm_output(PA6);

void setup() {
    pwm_output.setPeriodCycle(500, 250, FORMAT_MS);
    pwm_output.start();
}

void loop() {}

and change PA6 to PB6 to observe the difference. Tested on a GD32F303CC board.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: PWMRegarding the PWM componentbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions