-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issuing a reboot on ATmega328p makes the board loop-reboot #6836
Comments
The pull request is added as #6837 , the result of which is this serial port output for the same program:
|
Hummm .. I think I've bricked my board while testing the code above.
@zqad Any good idea on how to recover from this situation ? |
Ok, board unbricked ! |
Ah, good. Could not find anything matching that situation myself. |
But the bad news is that I've tested with your patch applied and result is the same ... loop-reboot ... |
That is bad news. Are you using the same avrdude command as above? I hope that I can get some time in the beginning of next week to try it again myself. |
@zqad , yes the same avrdude commande, in fact i just do a |
The ATmega1284P has this reboot-loop issue as well. Tested on BOARD=mega-xplained |
Is this issue still valid on current master? |
@kYc0o Confirmed just now on mega-xplained. |
@mali Are there fuse setting differences between boards that work and those that don't? The only other things I can think of that's significantly different between the two is the bootloader and UART adapter. |
@ZetaR60 fuses settings attached, honestly, I don't know how to interpret this .. |
Weird. It is reading the fuses as all being set to 0. Maybe retrieving it over USB is unsupported. I found the default fuse settings for both boards on some website and neither have watchdog always on set. |
Strangely I don't experience this on current master EDIT: in arduino-uno. Can anyone re-confirm this issue in another platform? |
arduino-uno: fixed? Not sure what has changed to make Arduino-Uno work now (and Duemilanove crash). |
Fixed by #9866. Closing. |
Consider this sample program:
Running it on the board gives this result on my serial console:
The error is due to the usage of the watchdog as the reboot method, without properly clearing the WDRF bit in MCUSR. This means that the watchdog will be activated with a 250ms timeout on the next reboot.
I have prepared a patch which I will add as a pull request to this issue. Feel free to give feedback on it, in case you find anything noteworthy with it.
Thanks,
/Jonas
The text was updated successfully, but these errors were encountered: