Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« on: November 24, 2010, 05:00:24 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #1 on: November 24, 2010, 06:10:00 am » |
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?
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
Netherlands
Offline
Tesla Member
Karma: 90
Posts: 9393
In theory there is no difference between theory and practice, however in practice there are many...
|
 |
« Reply #2 on: November 24, 2010, 06:56:41 am » |
What is wanted is a memory erase button. Reminds me of mission impossible 
|
|
|
|
« Last Edit: November 24, 2010, 06:56:53 am by robtillaart »
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« Reply #3 on: November 24, 2010, 08:28:40 am » |
@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.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Faraday Member
Karma: 15
Posts: 2852
Gorm deficient
|
 |
« Reply #4 on: November 24, 2010, 08:36:16 am » |
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.
|
|
|
|
|
Logged
|
Per Arduino ad Astra
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« Reply #5 on: November 24, 2010, 08:44:31 am » |
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. 
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5453
Strongly opinionated, but not official!
|
 |
« Reply #6 on: November 24, 2010, 11:02:03 am » |
The arduino has "HARD" reset capability via the ISP header and an external programmer (which can be another arduino...)
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #7 on: November 24, 2010, 12:25:38 pm » |
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
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« Reply #8 on: November 24, 2010, 01:35:26 pm » |
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. :-/
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Online
Brattain Member
Karma: 137
Posts: 19051
I don't think you connected the grounds, Dave.
|
 |
« Reply #9 on: November 24, 2010, 01:39:43 pm » |
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".
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« Reply #10 on: November 24, 2010, 04:15:29 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
NYC
Offline
Newbie
Karma: 0
Posts: 4
Arduino rocks
|
 |
« Reply #11 on: November 24, 2010, 04:19:40 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Italy
Offline
Brattain Member
Karma: 219
Posts: 16462
Don't know what I do
|
 |
« Reply #12 on: November 24, 2010, 04:26:38 pm » |
It was during some tests with the serial port that I started feeling the need for this kind of button 
|
|
|
|
« Last Edit: November 24, 2010, 04:27:07 pm by leo72 »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #13 on: December 02, 2010, 11:31:39 pm » |
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
|
|
|
|
« Last Edit: December 02, 2010, 11:34:43 pm by abanie »
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15316
Measurement changes behavior
|
 |
« Reply #14 on: December 03, 2010, 02:35:32 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
|