0

I'm wondering if anyone knows if it's possible to do a software reset using the watchdog timer on a microcontroller using the Micronucleus bootloader. When I try it, it doesn't fully reset, as in when connected with USB to a computer, it doesn't appear as a libusb device for a short period of time.

I'm suspecting a watchdog timer reset isn't as early in the boot process as necessary for Micronucleus to wait for programming.

I'm using an ATTiny841 to make a small wrist watch for my son, and I wanted to keep it to a single button. I've been resetting for programming with a pair of tweezers grounding the reset pin side of a pullup. Not a huge deal if it's not possible, once I have the code set, there won't be much need to re-program.

Here's the watch so far: https://www.youtube.com/watch?v=lkH16xzkSJM

Thanks in advance!

  • So you are trying to put the ATTiny into bootloader mode? I think you need to look at the ENTRYMODE setting of the micronucleus bootloader – Gerben Jan 23 at 10:44
  • Ahhh… that looks like it would do it exactly! Thanks! I had just been using the pre-compiled firmwares for the 841. Looks like I'll have to take the plunge and learn how to compile my own. – Chris Jan 23 at 20:26
  • I just flashed a bootloader compiled with the entry mode set to watchdog and it works perfectly! Thanks so much, I wouldn't have thought to look for a solution there. – Chris Jan 24 at 16:57
  • Great to hear. Your project already looks great. Looking forward to seeing the end result (I already subscribed to your youtube channel). – Gerben Jan 24 at 19:12
  • 1
    Thanks, yea, I enjoy the hardware design part as much as I do the electronics! – Chris Feb 26 at 3:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.