Eralt / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Uno fails to run PWM on pin 9 and 10 (actually, anything with optiboot.) #364

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. The "Fading" sample sketch fails to work on an Arduino Uno

Please provide any additional information below.

the problem is that optiboot using Timer1 to blink the LED, and leaves it in a 
state that arduino's core init() function doesn't expect, causing the timer to 
end up improperly configured.

Workaround, in the user sketch, add:
    TCCR1B &= ~_BV(CS12);

Minimally invasive patch for wiring.c attached.  A more correct patch would 
have init setting whole register contents instead of just flipping some bits.

Original issue reported on code.google.com by wes...@gmail.com on 2 Oct 2010 at 9:35

Attachments:

GoogleCodeExporter commented 9 years ago
http://github.com/arduino/Arduino/commit/b3ba5d4f97875a68023ba3a931ffcecd1c8cf70
6

BTW, a more correct patch would be great, too, if you want to do that.

Original comment by dmel...@gmail.com on 2 Oct 2010 at 5:41

GoogleCodeExporter commented 9 years ago
Issue 382 has been merged into this issue.

Original comment by dmel...@gmail.com on 19 Oct 2010 at 11:00