advance information: serious USBaspLoader (+tinyUSBboard) bug

OP #3905047
Rate this post
• ▲ useful
▼ not useful
Date of discovery:
2014/11/29

Rating:
High

URL:
https://github.com/baerwolf/USBaspLoader

Description:
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 
unprogrammed).
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 
presses.
This also renders the RESET pin/button effectivly useless.

ATmega8 v0.97 is NOT effected by this bug.

Patch:
Upcoming asap  -  but still ongoing investigation

Workaround:
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.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.