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.
@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.
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".
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.
yes guys you have to make an erase button because if some thing goes wrong spacial with serial port
or at least make the program delay for like 1 second
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.
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.