Author Topic: What's the ERASE button for?  (Read 3766 times)

SukkoPera

  • Newbie
  • *
  • Posts: 12
What's the ERASE button for?
« on: January 13, 2014, 04:01:34 pm »
I am wondering what is the exact purpose of the ERASE button on my DigiX. The only mention I could find for it in the docs is the following:

Quote
If the COM port isn't showing in the Arduino IDE - unplug and replug the board. If that doesn't work - while plugged in, hold down the erase button on the board for a moment and then unplug and replug - you may then have to select it from the com port menu as it may be on a different port - but it is a sure way to get it to respond even if your sketch crashed the USB stack.

Now, that helps, but I would always be afraid of pressing a button with such a name. Can someone please add some more details?

Thanks!

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: What's the ERASE button for?
« Reply #1 on: January 13, 2014, 10:48:48 pm »
Erase does a full erase of the MCU's program space flash memory - leaving only the read-only USB bootloader - which makes the port show up a Bossa Programming Port - but it can be programmed from the IDE just the same.

The reason for it is that the regular DigiX bootloader runs in program space, so if your program crashes (overrun, 100% cpu, etc) it won't be able to be reprogrammed - you can then hit erase (and then reset) to go back to the read only bootloader, program, and be back in the game

SukkoPera

  • Newbie
  • *
  • Posts: 12
Re: What's the ERASE button for?
« Reply #2 on: January 14, 2014, 01:23:37 am »
Thanks a lot, now it's clear. I don't think that is stated anywhere else with such clarity :).

SukkoPera

  • Newbie
  • *
  • Posts: 12
Re: What's the ERASE button for?
« Reply #3 on: January 22, 2014, 03:50:47 am »
I have integrated this information in the wiki basics page: http://digistump.com/wiki/digix/tutorials/basics.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: What's the ERASE button for?
« Reply #4 on: January 22, 2014, 10:59:13 pm »
Thank you!