Yahoo Groups archive

AVR-Chat

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

Thread

ATTiny devices won't start

ATTiny devices won't start

2010-05-02 by anickol

Hello.

I've ran into a problem that I do not know how to solve.
It seems that under some conditions ATTiny devices hang during reset.
It happens not at every start, it seems to be a relativeky rare case.
But it happens. I've seen it with ATTiny13V and ATTiny2313 so far.

How it is done. The power line has 100uF electrolytic capacitor and a decoupling ceramic 1uF one near the Atmel device. The reset circuit has 10 KOhm resistor to +5V. At start the controller sometimes is in unpredictable state, sometimes the pins are low, sometimes high.
Watchdog timer DOES NOT always reset the device, even if WDTON is programmed.

The device is working as a high current PWM controller, so the power line is not perfect. However, I've never seen it hang if it managed to start.

Out of about 100 power-on attempts about 10 ended in unpredictable state and other 20 were resetted by WDT. Other 70 went normal.

Applying external Reset when the controller hangs restores normal operation, however simple R-C reset circuit does absolutely nothing.
I tried various C and R combinations, but they did not reduce or increase the number of fails.

Other odd thing is that failures seems to appear in groups. Once it hangs, it will most probably hang again next time.

What is going wrong ?

Re: ATTiny devices won't start

2010-05-02 by anickol

--- In AVR-Chat@yahoogroups.com, Leon Heller <leon355@...> wrote:

> 
> You are probably getting transients from whatever you are controlling 
> affecting the AVR.
> 

Thank you, Leon. I thought about it, but there is no capacitance (except for FET gate) there. I tried to add delay for transient process time (few ms) after reset, but it did nothing.

Re: ATTiny devices won't start

2010-05-02 by anickol

--- In AVR-Chat@yahoogroups.com, Leon Heller <leon355@...> wrote:


> 
> Whenever a current is switched there will be transients.

That's correct, but switching does not start.

Re: ATTiny devices won't start

2010-05-02 by anickol

--- In AVR-Chat@yahoogroups.com, enkitec@... wrote:

> 
>      What are the fuses setings?
> 
>      Mark Jordan
>

Fuse settings are default. I only tried to turn on WDTEN.

Re: [AVR-Chat] ATTiny devices won't start

2010-05-02 by Leon Heller

On 02/05/2010 17:41, anickol wrote:
>
> Hello.
>
> I've ran into a problem that I do not know how to solve.
> It seems that under some conditions ATTiny devices hang during reset.
> It happens not at every start, it seems to be a relativeky rare case.
> But it happens. I've seen it with ATTiny13V and ATTiny2313 so far.
>
> How it is done. The power line has 100uF electrolytic capacitor and a decoupling ceramic 1uF one near the Atmel device. The reset circuit has 10 KOhm resistor to +5V. At start the controller sometimes is in unpredictable state, sometimes the pins are low, sometimes high.
> Watchdog timer DOES NOT always reset the device, even if WDTON is programmed.
>
> The device is working as a high current PWM controller, so the power line is not perfect. However, I've never seen it hang if it managed to start.
>
> Out of about 100 power-on attempts about 10 ended in unpredictable state and other 20 were resetted by WDT. Other 70 went normal.
>
> Applying external Reset when the controller hangs restores normal operation, however simple R-C reset circuit does absolutely nothing.
> I tried various C and R combinations, but they did not reduce or increase the number of fails.
>
> Other odd thing is that failures seems to appear in groups. Once it hangs, it will most probably hang again next time.
>
> What is going wrong ?


You are probably getting transients from whatever you are controlling 
affecting the AVR.

Leon
-- 
Leon Heller
G1HSM

Re: [AVR-Chat] Re: ATTiny devices won't start

2010-05-02 by enkitec@gmail.com

On 02-May-10 14:57, anickol wrote:
>
> --- In AVR-Chat@yahoogroups.com, Leon Heller<leon355@...>  wrote:
>
>    
>> You are probably getting transients from whatever you are controlling
>> affecting the AVR.
>>
>>      
> Thank you, Leon. I thought about it, but there is no capacitance (except for FET gate) there. I tried to add delay for transient process time (few ms) after reset, but it did nothing.
>
>    


     What are the fuses setings?

     Mark Jordan

Re: [AVR-Chat] Re: ATTiny devices won't start

2010-05-02 by Leon Heller

On 02/05/2010 18:57, anickol wrote:
>
>
> --- In AVR-Chat@yahoogroups.com, Leon Heller<leon355@...>  wrote:
>
>>
>> You are probably getting transients from whatever you are controlling
>> affecting the AVR.
>>
>
> Thank you, Leon. I thought about it, but there is no capacitance (except for FET gate) there. I tried to add delay for transient process time (few ms) after reset, but it did nothing.

Whenever a current is switched there will be transients. Inductive loads 
are the usual cause of problems.

Leon
-- 
Leon Heller
G1HSM

Re: ATTiny devices won't start

2010-05-02 by Donald H

--- In AVR-Chat@yahoogroups.com, "anickol" <anickol@...> wrote:
>
> 
> 
> --- In AVR-Chat@yahoogroups.com, Leon Heller <leon355@> wrote:
> 
> 
> > 
> > Whenever a current is switched there will be transients.
> 
> That's correct, but switching does not start.
>

Remove your high current load altogether.

An idnuctive load may get energized for a few uSec and can cause transients.

don

Re: ATTiny devices won't start

2010-05-03 by anickol

--- In AVR-Chat@yahoogroups.com, "anickol" <anickol@...> wrote:

I said that fuse settings were default. Now I am in doubt.

I made 3 more boards, the same as the first one. I used ATTiny13V chips from the same batch, with the same marking, purchased at the same time in the same place...

Fuse settings were different.

Moreover, all 3 boards worked fine. I switched them on and off 100 times using the same switch and the same load and the same power supply. All worked without a single issue. Another strange thing is that 2 of 6 ATTiny13V chips did not work at all (at least in serial programming mode) Others had fuse settings as follows:

2 had 4.8 MHz clock and WDTON disabled
1 had 9.6 MHz clock, CKDIV8 enabled and WDTON enabled
1 had 4.8 MHz clock and WDTON enabled

What's going on ?

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

Re: ATTiny devices won't start

2010-05-06 by anickol

--- In AVR-Chat@yahoogroups.com, "Gregory N" <spudarnia@...> wrote:

> 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.

Thank you for reply, but this is probably not my case. I have "nearly stateless operation", that means in any case if the program will continue running, in a very short time every variable will be properly reinitialized. I even added setting DDRX ports to the main loop.

The only place where the situation you described could appear is the GCC startup sequence.

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.