Arduino occasionally freezes on power-up and will no reset

Hi,

It's been a long time since I've posted so I thought I'd post this in case anyone else has had problems with freezing. I had an issue were my program occasionally froze at start-up and the reset button wouldn't even work. It occurred only at start-up but was seemingly quite random - around 1 in 10 boots would get into this frozen state. Hard reset (disconnect power) worked mostly but not always. I found that it seemed to be caused by the chip start-up time. I am using an Atmega8 with start-up time of 16K + 0ms (fuse bits 0xDF 0xCA) but when I set the fuse bits to a longer start-up of 258CK + 64ms (0xd 0xd9) the problem goes away.

I thought I would just put this here as a resource for others or if someone can tell me why this happens. I do not know if this is specific for Atmega8, 16Mhz crystal/22nf caps or the PL2303 I use for USB-to-serial on my home-brew Arduino.

B.

Hi,

Have you tried Full Swing Oscillator instead of External Crystal Oscillator?

I am using an Atmega8 with start-up time of 16K + 0ms (fuse bits 0xDF 0xCA) but when I set the fuse bits to a longer start-up of 258CK + 64ms (0xd 0xd9) the problem goes away.

From the 328 datasheet (I suspect this also applies to the 8)…

  1. These options should only be used when not operating close to the maximum frequency of the device, and only if frequency stability at start-up is not important for the application. These options are not suitable for crystals.

I suggest this option…

Crystal Oscillator, slowly rising power 16K CK 14CK + 65ms