Watchdog reset for Standalone Atmega328p / Pro mini 3.3V 8Mhz not working.

Hello,
I need watchdog reset for my application. Atmega328p is running on 3.3v/8Mhz. I am using Pro Mini 8mhz,3.3v bootloader and FT232R for communication. When watchdog reset happens, it is not able to clear watchdog flag and it goes to infinite reset loop. I must need to cut power to start it again. I did try few things from previous forums but watchdog doesnt work. I have verified my code in UNO and watchdog reset works perfect. I am aware that I can use optiboot by modifying boards.txt and bootloader hex files. But then I am not able to upload sketch. So is it possible to change Promini bootloader which will clear the watchdog flag on startup?

I would bootload it with optiboot and change boards.txt correctly, so it could upload over serial. Optiboot is strictly better than the bootloader that the pro mini and nano came with.

If you were unable to upload sketches over serial after doing that as you said, you did it wrong - probably the new boards.txt entry had problems (base it on the Uno entry, with the same bootloader file, but change the F_CPU to 8000000UL and the upload speed to 57600 instead of 115200). It's really easy to mess up the syntax of boards.txt - for example, by forgetting to change the board name to the new board at the beginning of a line or something.

Now I did copied exactly from UNO entry still doesnt work.

aaa.name=Promini optiboot


aaa.upload.tool=avrdude
aaa.upload.protocol=arduino
aaa.upload.maximum_size=32256
aaa.upload.maximum_data_size=2048
aaa.upload.speed=57600

aaa.bootloader.tool=avrdude
aaa.bootloader.low_fuses=0xFF
aaa.bootloader.high_fuses=0xDE
aaa.bootloader.extended_fuses=0x05
aaa.bootloader.unlock_bits=0x3F
aaa.bootloader.lock_bits=0x0F
aaa.bootloader.file=optiboot/optiboot_atmega328.hex

aaa.build.mcu=atmega328p
aaa.build.f_cpu=8000000L
aaa.build.board=AVR_UNO
aaa.build.core=arduino
aaa.build.variant=standard

Enable verbose uploads in settings, and post the error you get here.

Did you do burn bootloader first successfully after creating that new entry, before trying to upload to it?

Yes, I relaunched Arduino IDE, Successfully Uploaded bootloader again (verbose output attached)

after trying to upload sketch got following.

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Users\USER\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino5/etc/avrdude.conf"

         Using Port                    : COM5
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x38
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x38

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

Note - I am using FT232R and its working without any problem if I am using pro mini 3.3v/8mhz bootloader

bootloader verbose.txt (9.37 KB)

Hello!

I know this is old, but I'm facing the same problem... Its really annoying trying to upload code to a custom pro mini board (it's a stand-alone ATMega328P with 8Mhz crystal and 3.7 battery). I'm using Arduino UNO (w/o MCU) to upload code.

Same board with UNO Bootloader, 16Mhz and 5v upload perfectly.

But when I decided to change to ProMini Optiboot Bootloader (do changes on boards.txt) uploading a sketch become a nightmare. Just few times upload fine with no problems, but most of the time it fails with the same error as above. And when it works it is because I manually press the reset button right before uploading starts, but sometimes it took me 20-30 retries before it upload successfuily.

Thank you in advance!