Hello,
I'm trying to use a watchdog timer but while reading the ATMEGA datasheet, I became interested in also tracking when the Yun resets by reading the MCUSR. I have since read through the forums and found that the bootloader prevents this by setting the MCUSR to zero during boot.
I read a potential fix here to change the "MCUSR = 0;" line in the bootloader: Bootloader and MCU reset register - Microcontrollers - Arduino Forum
I also read that the Linux side of the Yun loads the bootloader when updating the sketch over the network which makes it possible to change the bootloader
https://forum.arduino.cc/index.php?topic=341261.0
"If you upload it over the network (either using the IDE, the web interface, or by manual commands using SSH) you are first combining the sketch with the bootloader into a combined image, and then running avrdude on the Linux processor."
I'm running out of reliable information sources (limited documentation) and would appreciate any advice. I'm mostly needing more information about how to upload a new bootloader over the network through the IDE. If someone already did this that would be perfect. In the end, I want to know why my Yun has reset (watchdog, brown-out, etc). If I can fix the bootloader issue, I'm planning on modifying the code here to read the MCUSR http://www.avrfreaks.net/forum/handy-watchdog-debugging-tricks
Thanks