Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while writing flash memory (again but this time on MKR1000) #16

Open
ogermer opened this issue Mar 15, 2018 · 6 comments
Open

Error while writing flash memory (again but this time on MKR1000) #16

ogermer opened this issue Mar 15, 2018 · 6 comments

Comments

@ogermer
Copy link

ogermer commented Mar 15, 2018

Hi,

user of MKR1000 board here! (OS X / Arduino IDE 1.8.5 (which is >1.6.10) / WiFi101 library v0.15.2)

I am experiencing the same problem as described in other issues - but on a MKR1000 board:

java.lang.Exception: Error while writing flash memory.
	at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.writeFlash(FlasherSerialClient.java:133)
	at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:86)
	at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)

The Wifi part of my board seems to be bricked by now which is most annoying. What can I do?? I looked at the other issues posted here but did not come up with a proper recommendation for my case (as I use an Arduino MKR1000 board and not a WiFi101 or Adafruit board).

I tried different Wifi101 library versions, changed USB ports and cables and did everything as described in the tutorial https://www.arduino.cc/en/Tutorial/FirmwareUpdater

In can successfully launch the Firmware Updater Utility from the IDE and can see the USB port and the test of the board works fine.

Updating the firmware (no matter which version I choose) is not successful:

erasing target... Error while writing flash memory.

Clicking the upload button again leads to a "Programmer not responding" error message.
I need to reboot the MKR1000 in order to reach it again from the Update Utility.

So what are my options?

@sandeepmistry
Copy link
Contributor

@ogermer make sure you are using the latest SAMD core, which is 1.6.18 at this time. You can update in the IDE via Tools -> Board ... -> Board Manager and then search for SAMD.

@ogermer
Copy link
Author

ogermer commented Mar 15, 2018

@sandeepmistry That solved the problem. I could successfully upload the new firmware.
Thanks a lot for the immediate response!
It would be good to have this topic covered in the Firmware Updater tutorial as probably most users upgrade the board database only when they need to connect a new board...

@ogermer
Copy link
Author

ogermer commented Mar 15, 2018

@sandeepmistry
Running the firmware check CheckWifi101FirmwareVersion I get the following message:

WiFi101 firmware check.

WiFi101 shield: DETECTED
Firmware version installed: 19.5.2
Latest firmware version available : 19.5.4

Check result: NOT PASSED
 - The firmware version on the shield do not match the
   version required by the library, you may experience
   issues or failures.

While things seem to work, this is a bit confusing. 19.5.2 is the latest version offered in the updater tool of my IDE (v1.8.5). Would the IDE beta version offer the 19.5.4 version?

Again: I am using WiFi101 library version 0.15.2...

What a can of worms... ;-)

@sandeepmistry
Copy link
Contributor

It would be good to have this topic covered in the Firmware Updater tutorial as probably most users upgrade the board database only when they need to connect a new board...

Good suggestion, @akash73 or @SimonePDA can you handle this please?

Would the IDE beta version offer the 19.5.4 version?

That's correct, a new version of the IDE has not been released since the f/w version was updated.

cc/ @facchinm @cmaglie

@facchinm
Copy link
Member

Both nightly and beta version of the IDE should contain the updated FirmwareUpdater, so the link should temporarily instruct to download one of these two versions @SimonePDA

@BlckShadow
Copy link

BlckShadow commented Oct 28, 2018

I've been stuck with this error while working on a MKR 1000 board.
It was working fine initially but stopped working all of a sudden. Prior to this, I uploaded the FirmwareUpdater Sketch & I was trying to upload the SSH certificate when I got the "Error while reading memory" error. I tried the 'Reset twice' option but it always fails during the SSH upload (or) the firmware update.

java.lang.Exception: Error while erasing flash memory.
	at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.eraseFlash(FlasherSerialClient.java:139)
	at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.updateFirmware(JavaFlasher.java:79)
	at cc.arduino.plugins.wifi101.UpdaterImpl$3.run(UpdaterImpl.java:138)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants