Forum: µC & Digital Electronics advance information: serious USBaspLoader (+tinyUSBboard) bug

von Stephan B. (matrixstorm)

Rate this post
0 useful
not useful
Date of discovery:



In all USBaspLoader version up to 0.97 exists a bug, which causes the 
watchdog timer to continously reboot.

When a users firmware activates the watchdog timer, and then times out:
The MCUC(S)R register then has WDRF bit to HIGH.
On some ATmegas this keeps the AVRs internal hardware reset,
from resetting the active watchdog (even when the WDTON fuse is 
However the timeout period is reset anyway to minimal value of 16ms 
(WDP* to LOW).

In the bootloaders PROG-PIN chargeup phase, the bootloader stalls 50ms, 
causing the AVR to reboot.

For deactivating the watchdog timer, some AVRs need to reset the WDRF 
bit first.
But since also the hardware reset seems to be restricted to this measure 
(hardware bug???), the watchdog stays on ever - even during RESET 
This also renders the RESET pin/button effectivly useless.

ATmega8 v0.97 is NOT effected by this bug.

Upcoming asap  -  but still ongoing investigation

NO software workaround known.
In order to access the bootloader again, dis- and reconnect the power 
where possible.

On AVRs except ATmega8, it is recommended to avoid using the API 
(https://github.com/tinyusbboard/API) until a patch/update is provided.

: Edited by User
von Stephan B. (matrixstorm)

Rate this post
0 useful
not useful


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.