Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PWM does not work on pins needing pin remapping #4

Open
maxgerhardt opened this issue Jun 18, 2021 · 0 comments
Open

PWM does not work on pins needing pin remapping #4

maxgerhardt opened this issue Jun 18, 2021 · 0 comments
Labels
bug Something isn't working Component: PWM Regarding the PWM component

Comments

@maxgerhardt
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Component: PWM Regarding the PWM component
Projects
None yet
Development

No branches or pull requests

1 participant