EmbDev.net

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


von Stephan B. (matrixstorm)


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.

: Edited by User
von Stephan B. (matrixstorm)


Rate this post
useful
not useful

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.