Close

AVR Startup Timer issue

A project log for AVeRCADE

Customisable USB adapter for arcade controls.

danjovicdanjovic 11/10/2015 at 01:020 Comments

When I moved from prototype to final circuit I decided to add a 100nF capacitor at RESET line of the AVR to enhance noise immunity on this line, but unfortunately a side effect have appeared: With the capacitor the firmware always executed the bootloader.

The first analysis pointed to the hypothesis that capacitor stretches the time the reset line is held low beyond the time the AVR takes to start to execute code and then the flag EXTRF is set thus triggering the bootloader to run.

The datasheet suggests that the time MAX treshold for the RESET pin is 0.9Vcc which means 4.5Volts when the AVR is USB powered.

The measurements taken on RESET pin endorsed this hypothesis. For a pullup resistor of 47K and a 100nF capacitor this time was close to 10ms.

The used SUT (Start Up Timer) configuration was 16K ck + 0ms, which also endoresed the hypothesis (16K cycles at 16MHz means roughly 1ms).

The initial solution was to program the fuses for 16K ck + 64ms, which should be far beyond the time needed to reach the upper treshold voltage for RESET pin.

Buuuuuut... it doesn't worked. The AVR insists on entering the bootloader right after power up. So the solution for now is to take out the capacitor.

By the way, the waveform on RESET pin without the boot capacitor is very interesting : A small peak, then a 1V plateau that takes about 250us, then the voltage rises abruptally and then start to rise relatively slow until it reaches Vcc.


Discussions