Arduino not programmable after WatchDog Enable

Hi Guys i was trying to add a software reset in my code to reset after a crash but after adding watch dog enable in my setup i cant reset my arduino any more nor i am able to program it nor it jumps into the program but just the led on pin 13 Blinks rapidly

i dont have any other programmer to burn bootloader as i use this to program other MCU so please help me relieve this back

as i am working on a project and i need it to work as normal again

That can be a problem with some 'Arduinos' you can buy, the bootloader does not support the Watchdog function properly.

So it depends on which Arduino you have and you did not say.

srnet:
That can be a problem with some 'Arduinos' you can buy, the bootloader does not support the Watchdog function properly.

So it depends on which Arduino you have and you did not say.

Arduino Uno i have and the bootloader is the optiboot and the board was a clone so i did not reprogram the bootloader it was as is

and later i realised there was a bug with WDT in Bootloader and i have no programmer

how do i do it please help me

the Nano "old bootloader" problem goes away if you disconnect the Nano from power.

Juraj:
the Nano "old bootloader" problem goes away if you disconnect the Nano from power.

Mine is Uno a Clone Board i tried everything the board does not even reset it just takes a second to load when i plug the cable in the PC

You need the upload to catch the board before the program runs.

If you hold down the reset button and release it only when the IDE starts to attempt the program upload you ought to catch it before the program on the UNO has time to run ...........................................

This is also an issue on most Pro Minis you buy, but there is a solution.

srnet:
You need the upload to catch the board before the program runs.

If you hold down the reset button and release it only when the IDE starts to attempt the program upload you ought to catch it before the program on the UNO has time to run ...........................................

This is also an issue on most Pro Minis you buy, but there is a solution.

No it's not working it is like not running flash application nor bootloader is there any way to use the atmega16U2 to program the atmega328P using ISP not Serial

akash614:
No it's not working it is like not running flash application nor bootloader is there any way to use the atmega16U2 to program the atmega328P using ISP not Serial

The atmega16U2 is not connected to the pins required for ISP on the Atmega328.

srnet:
The atmega16U2 is not connected to the pins required for ISP on the Atmega328.

But there are pins on top to use it and according to the schematic it is connected to these pins just why not connect these with atmega328p

Can we program the chip with atmel flip to function as a USBASP or AVRASP something like that

please help me with that

Do you have a HEX file that turns the ATmega16U2 into an ISP programmer ?

srnet:
Do you have a HEX file that turns the ATmega16U2 into an ISP programmer ?

compiling "Arduino as ISP" sketch for Leonardo or Micro could work.
(and setting the correct pin to 328p reset)

edit:
here is a core for 16u2

srnet:
Do you have a HEX file that turns the ATmega16U2 into an ISP programmer ?

i have used the onboard Atmega16U2 as AVRASP MKII and program the ATMEGA328P with the bootloader once again and burned the fuses and the set Atmega16U2 as Usb to Serial converter as previous and everything is back to normal

Juraj:
compiling "Arduino as ISP" sketch for Leonardo or Micro could work.
(and setting the correct pin to 328p reset)

edit:
here is a core for 16u2
Software Installation · NicoHood/HoodLoader2 Wiki · GitHub

this did not require as there were few online hex files and the atmel flip was used to do it thanks by the way posting the link

is there any other way to reset the arduino in case of error from software side and what bootloader should i use now to prevent the issue like before

Please post the link for Correct bootloader with the fixed bug of watchdog reset

akash614:
i have used the onboard Atmega16U2 as AVRASP MKII and program the ATMEGA328P with the bootloader once again and burned the fuses and the set Atmega16U2 as Usb to Serial converter as previous and everything is back to normal this did not require as there were few online hex files and the atmel flip was used to do it thanks by the way posting the link

is there any other way to reset the arduino in case of error from software side and what bootloader should i use now to prevent the issue like before

Please post the link for Correct bootloader with the fixed bug of watchdog reset

on your computer in IDE installation folder in
hardware/arduino/avr/bootloaders/optiboot

it is used if you use "Burn bootloader" in IDE and Uno is the selected board

@pert Per, did you read this thread? I think it is interresting

Juraj:
on your computer in IDE installation folder in
hardware/arduino/avr/bootloaders/optiboot

it is used if you use "Burn bootloader" in IDE and Uno is the selected board

@pert Per, did you read this thread? I think it is interesting

i Tried from arduino ide but failed all the time giving me the error USB device with PID & VID not connected

so i decided to use the atmel studio 6 and worked immediately