Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: ATTiny devices won't start

2010-05-04 by Gregory N

I had a probably that was at least superfically similar to this one on an at90usb (maybe the logic is similar).  This, however, turned out to be a software problem.  I'll describe the problem, if it applies, great!  If not, sorry to fill your email.

The problem was that I was saving the reset cause then clearing the reset cause register early in initialization.

The software logic tried to recover gracefully from resets.  It did not initialize some things in the case of a reset, but instead tried to continue running with the same state after the reset.

The problem occurred during initialization when the LCD was powered -- sometimes this caused another reset because of power-related issues.  However, this reset occurred before I completed initialization for the first time.  Now, since this was a reset, some things were not initialized; but since the reset occurred before I finished the first initialization, this things were never initialized and a crash followed.

This fix was simple:  Don't clear the reset cause until you finish initialization.

Greg

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.