[SOLVED] Auto-reset works 1 time only after New Arduino Bootloader burn (ATMEGA328P)

Hi everyone,

I'm conceiving a PCB for a project that imply specific form factor and I/Os not available on common shields. I found Arduino Serial programming really user friendly and decided to make an Arduino copy for the Microcontroller core.

My Arduino is based on the Arduino Nano (ATMEGA328P), with exact same layout and exact same components as in a common Nano.

Once the PCB is assembled with a blank ATMEGA 328P, I find no problem Burning the Arduino Bootloader with an USB ASPAVR programmer.

When testing the Serial Programming, the chip auto-reset works fine ONCE and the serial programming goes well. I upload this little sketch with USB (that makes a LED blink quick to show the serial programming went well) :

void setup(){pinMode(13,OUTPUT);}

void loop(){

digitalWrite(13,HIGH); delay(100);
digitalWrite(13,LOW); delay(100);
}

When testing the Serial Programming again, the chip auto-reset does not occur. However, the sketch is uploaded fine if I press the reset button on my board before the Handshake signal is sent by the computer.

How can I solve this problem ????

It seems like the only thing missing is the auto-reset triggered by the FTDI chip with a 100nF capacitor connected to RESET pin of my microcontroller (classic layout).

When looking closer with an analyser, I can see the drop of the Reset Pin triggered by the FTDI chip (not any different than after a freshly burned bootloader). It just seems that the Microcontroller Ignores the reset drop when the Bootloader has just been burned (what the ..... ?).

If I burn the Bootloader again with my USBASP AVR programmer, the same happen. Serial programming works once with auto-reset, then the auto-reset is somehow disabled (even if on a Hardware side, the Reset pin is pulled low during the same lapse of time by the FTDI chip every time I attempt serial programming).

I guess it is be a Software problem linked to the ATMEGA 328P since it works fine one time on each new bootloader burn and there is no sign of Hardware problem (Reset pin drop occurs overtime).

Thank you for your Help !!

Best,

Karim

What are your fuse settings?

My guess is that you have the fuses not set to run the bootloader.

It works the first time when no sketch is present as it falls through to the bootloader but once there is code there it just runs your blink sketch.

If that does not solve it perhaps post your schematic.

The fuses weren't set correctly for my Microcontroller indeed, now it works perfectly :slight_smile: !!

Thanks for guiding me in the right way !!

Hi guys,

i'm sorry to relive an old post, but can you please share what is the correct fuses settings so that auto-reset works for ATMEGA328P?

please help, thank you.