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 not working on pin 9? #117

Closed
Gregwar opened this issue Mar 21, 2016 · 3 comments
Closed

PWM not working on pin 9? #117

Gregwar opened this issue Mar 21, 2016 · 3 comments

Comments

@Gregwar
Copy link
Contributor

Gregwar commented Mar 21, 2016

It appear that pin 9 PWM doesn't work, the following code:

    HardwareTimer timer(2);
    timer.pause();
    timer.setCount(0);
    timer.setOverflow(1000);
    timer.setPrescaleFactor(1);
    timer.setMode(TIMER_CH1, TIMER_PWM);
    timer.setMode(TIMER_CH2, TIMER_PWM);
    timer.setMode(TIMER_CH3, TIMER_PWM);
    timer.setMode(TIMER_CH4, TIMER_PWM);
    timer.refresh();
    timer.resume();

    pinMode(9, PWM);
    pwmWrite(9, 500);

Doesn't produce a PWM output on pin 9
However, writing it using OUTPUT and digitalWrite works
Also, producing a PWM on pin 8, which is also on timer 2 works

Any idea? (I've tried on two different boards just in case)

@mbolivar
Copy link
Contributor

No idea, sorry. We'd gratefully take a patch, but since Maple is EOL won't be working on issues.

@Gregwar
Copy link
Contributor Author

Gregwar commented Mar 23, 2016

OK
Do you have the setup to confirm or disconfirm the issue?
No problem if you can't, I will investigate
Thank you

@Gregwar
Copy link
Contributor Author

Gregwar commented Mar 29, 2016

It actually appear that this is related to my bootloader (still not sure why)

@Gregwar Gregwar closed this as completed Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants