snurce / optiboot

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

PWM on pins 9 and 10 not working with Optiboot #8

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load the Optiboot bootloader in the ATMega328P (duemilanove)
2. Connect a LED to pin 9 or 10 (with a current limiting resistor)
3. Load the "Fading" example: Examples>Analog>fading
4. Change the output pin to match the pin where the led is connected

What is the expected output? What do you see instead?
Expected: Fading led
Observed: Led will switch on and off, no PWM fading effect.
  The led acts like the PWM clock on the pin is really slow (slow as in waiting 10 seconds then turn on to full brightness for a short while, then off again).

What version of the product are you using? On what operating system?
Arduino 0018
Optiboot v3
Windows XP pro, SP2

Please provide any additional information below.
When using the Optiboot bootloader, the PWM functionality on pin 9 and 10 is 
lost.
It acts like the PWM clock is really (very very) slow.

Loading the original Arduino bootloader makes the problem go away, and all the 
PWM pins work as expected.
Loading the Optiboot again, reproduces the problem.

Original issue reported on code.google.com by davidk...@gmail.com on 31 Aug 2010 at 4:02

GoogleCodeExporter commented 8 years ago
Yes this is also confirmed for atmega8 port of OptiBoot.

Original comment by erdem...@gmail.com on 1 Oct 2010 at 12:07

GoogleCodeExporter commented 8 years ago
It has been fixed in the IDE 0021 update added today

Original comment by mitpatte...@gmail.com on 3 Oct 2010 at 3:11

GoogleCodeExporter commented 8 years ago
The fix in IDE 0021 is in the Arduino Core; I think optiboot should consider 
resetting the relevant timer to the power-on state (0) as well, if there is 
room.

Original comment by wes...@gmail.com on 5 Oct 2010 at 12:01

GoogleCodeExporter commented 8 years ago
Issue is due to assumptions of register state made in the Arduino core. Fixed 
in Arduino 21.

TCCR1B, UCSR0A/B/C, UBRR0L and MCUSR are currently corrupted by Optiboot. Now 
QAing a fix, so the only corrupted register is MCUSR (which is unavoidable).

Original comment by cathed...@gmail.com on 12 Oct 2010 at 6:47

GoogleCodeExporter commented 8 years ago
Fixed in source repo

Original comment by cathed...@gmail.com on 12 Oct 2010 at 8:21