Hard reset button

Hi.
I would like to suggest to the Arduino developers to implement an "hard reset" button to delete user programs from the Atmega memory in case there are some issues that can freeze Arduino into code loops when using serial port to communicate with the PC.

It is well known that when Arduino uses the serial port, it is rather impossible to upload new code to the Arduino because both the Arduino and PC use the same pins.

The actual reset button is only a "restart" button. With the "hard reset" anyone could clear the memory leaving only the bootloader in it.

The reset button is a hard reset button, it doesn't need quotes.
It is connected to the reset pin, how much harder can you get?

What is wanted is a memory erase button. Reminds me of mission impossible :slight_smile:

@Groove:
usually with "hard" it is meant "hardware", but I mean HARD, totally, complete. I mean "re-set" in the literally meaning of the therm: re-set the condition of Arduino as it exited from factory.

@robtillaart:
It isn't a mission impossible.
Simply an extra button that, when pressed, activate a portion of code into the bootloader of Arduino that erases (fill with 00) the portion of Flash Ram usually occupied by the user code or maybe reload the simple blinking code.

But your HARD 'solution' would involve some SOFT(WARE), because the AVR doesn't have an ERASE-ALL pin.
Which brings us back around to looping software.

I'm not a developer nor a master in electronics. I don't know how to do this nor if it really impossible. I suggested a thing that could be useful. :wink:

The arduino has "HARD" reset capability via the ISP header and an external programmer (which can be another arduino...)

I don't know how to do this nor if it really impossible. I suggested a thing that could be useful.

Useful? Possibly. Impossible, yes it is.

Lefty

Maybe my suggestion was misunderstood.
If you press the reset botton on the Arduino, the Atmega starts again the program into its memory.
If you have a program that has some logic issues and seems to freeze the Arduino (i.e. when using the serial ports, letting the Arduino unable to receive new code from the user) it could be interesting something that erases from the "internal" the looping code, letting it "new as from factory".

Ok. Impossible.
Forget about it. :-/

re-set the condition of Arduino as it exited from factory.

that erases (fill with 00) the portion of Flash Ram usually occupied by the user code

I think you may misunderstand the term "erase".

I'm Italian, sorry. For me, the meaning of "erase" is like the one of "delete".
But I think you've undestood the sense of my posts: a way to clean the user memory area to delete the code of any program.

A hard reset would have been useful last night when I made a sketch that was continuously outputting text to the serial without any pause.

It seemed to freeze up the IDE when I tried to use it with the Arduino connected and made it almost impossible to try to upload a new sketch.

I finally succeeded with some combination of unplugging the usb and hitting the reset and trying to upload. Really frustrating experience. I've learned to never do that again.

It was during some tests with the serial port that I started feeling the need for this kind of button :smiley:

yes guys you have to make an erase button because if some thing goes wrong spacial with serial port :slight_smile: :cry:
or at least make the program delay for like 1 second

or at least make the program delay for like 1 second

You could always make it your practice to start all your programs with a delay(1000) command in the set-up portion of your sketches.

Lefty

A hard reset would have been useful last night when I made a sketch that was continuously outputting text to the serial without any pause.

It seemed to freeze up the IDE when I tried to use it with the Arduino connected and made it almost impossible to try to upload a new sketch.

If you're using an Uno under Linux, there is a known issue here - with a fix available.

(See reply #34 under
Arduino Forum ? Software ? Development ? Problems with 0021 on Ubuntu 10.04 Lucid Lynx)

I finally succeeded with some combination of unplugging the usb and hitting the reset and trying to upload. Really frustrating experience. I've learned to never do that again.

I have the same problem as JimH, but I didn't finally succeeded to upload my sketch.

The reply #34 on the topic "Problems with 0021 on Ubuntu 10.04 Lucid Lynx" say :

Don't try this unless you are prepared to risk bricking your board completely!

So, I am not very enthusiastic to reflash the firmware with dfu.

How can I upload a sketch on my arduino 2560 ?
(I had to put a delay() before :'()

Well, there is a way to Chip Erase the ATMega328. But it requires applying 12V to the reset line within so many microseconds of VCC being applied. See section 27 of the datasheet.
The best way to do that is on a seperate programmer with the chip removed from the arduino - else the 12V on the reset line is likely to damage other parts on the board.

Thank you for your answer.

I found an other solution which fix my problem. I just plug the board on a windows 7 pc with arduino-0022, instead of ubuntu 10.10. 64bits with arduino-0021.
There is no freezes anymore and I can upload sketches.

Do you think that the problem comes from arduino's software's version or from linux ?

Do you know where I can find the arduino-0022 for linux 64bits ? Maybe it will fix the problem if it comes back.