Go Down

Topic: How to reset MKR1000? (Read 3510 times) previous topic - next topic

ShawnCruise

Is there any way to clear the current sketch from an MKR1000?  I got it connected to the 1.6.7 IDE but have not been able to upload anything new for the last day.  Sketches compile and upload but it never finishes uploading.  Clicked on the serial monitor and saw number flying by and quickly realized this is the last sketch I loaded when I was initially testing it out:

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(millis());
}

Seems like the upload won't finish because the MKR1000 is writing text out over the USB cable to the computer at the same time as I'm trying to upload code to it.

I tried holding the reset button when it is powered on and that didn't clear it. 

Any ideas?  I fear I may have bricked it.

pert

Please do the following:
  • Check the boxes at File > Preferences > Show verbose output during: compilation and upload
  • Restart the IDE
  • Attempt upload
  • After it fails to upload select all the text in the black console window on the bottom of the Arduino IDE window and paste it here using code tags(the </> button). If that's not allowed because the output is too long then put it in a text file and attach.

This will give us more information to hopefully help you find the solution.

ShawnCruise

Thanks.  Tried uploading the BareMinimum example.  Output attached.  Compile looks fine but upload fails because COM7 is in use. 

ShawnCruise

#3
Mar 05, 2016, 02:14 pm Last Edit: Mar 05, 2016, 02:22 pm by ShawnCruise
Did some digging and found others that have done the same thing.  Recommended approach to clear it is to hold down the reset and start the upload.  Get the timing right and let go of the reset so it activates during the compile and is ready for upload when the IDE starts the upload.  There should be a few milliseconds that the connection is open to upload the new sketch.  Tried that about 100 times and no luck.

Lesson learned.  Never upload a sketch like that.  Also add a short delay() as the first line in the sketch to prevent conflicts like this.

I think my brand new MKR1000 is bricked unless anyone has a different suggestion.

emeshuris

#4
Apr 11, 2016, 08:18 am Last Edit: Apr 11, 2016, 04:28 pm by emeshuris
Did you ever solve this?
I asked the same question in the sub board: http://forum.arduino.cc/index.php?topic=393114.new#new

a_guadalupi

I tried your sketch and I don't have any problem. However have you tried to double tap the reset button to force the bootloader mode during upload?

Go Up