I am having a problem here with an ATTiny87.
It sometimes doesn't start. Well actually most of the times it doesn't start (maybe 1 out of 20 attempts). Software seems to be ok; it is running fine when started from the debugger and is pretty simple anyway.
I first thought it is the oscillator. 8MHz crystal; 15pF. With fuses set to 3..8MHz the voltage swing (Peak-Peak) on XTAL1 was only about 1 Volt so I changed the fuses to 8..16MHz. Did not make a change but voltage swing now is about 1.2V. Can anybody confirm that this is enough?
I also experimented with various brownout level settings. Interestingly the Atmel tools allow you to use settings that are reserved in the data sheet. What I have now is 2.7V which I believe should work.
Fuses are: Ext.: 0xff, High: 0xdd, Low: 0xdf. This means: SPIEN enabled, Brownout detection 2.7V, no clock divide, External crystal osc. 8..16MHz, 16384C... (the rest is cut off by the Atmel tools; I believe it is 4.1ms startup time; but I'm not sure here either because the last selection here creates an invalid fuse setting according to the data sheet).
Supply voltage rises from 0 to 3.3V in about 7ms. Is that fast enough? Data sheet says min. 0.01V/ms.
Reset is connected to VCC via a 5k resistor; connecting it directly doesn't seem to make a difference.
When I apply a short external reset pulse it starts fine every time.
Only thing that I can think of is there are external components on the SPI pins (resistors to LEDs). Could that prevent the startup? Throuble here is that if I disable the SPIEN I do not have access for programming any more.