arduino / WiFi101-FirmwareUpdater-Plugin

WiFi101 Firmware Updater Tool for Arduino IDE
13 stars 23 forks source link

Error while erasing flash memory #13

Closed rpkelley closed 6 years ago

rpkelley commented 6 years ago

Hi Team -- I'm a brand-new user, both with respect to Arduino and the WiFi101 board. The issue is that I'm getting an error while trying to update my WiFi101 Firmware: "Error while erasing flash memory." image Getting into more details, I've been following the guide here: https://www.arduino.cc/en/Tutorial/FirmwareUpdater. Testing the connection works: image My WiFi101 board number ends with "PB", so I think that in the "Update Firmware" box I have correctly selected the WINC1501 Model B (19.5.2): snip20180106_1 But when I click "Update Firmware" I get the error shown above in a pop-up window and also the following in the Arduino command line:

Sketch uses 10046 bytes (31%) of program storage space. Maximum is 32256 bytes. Global variables use 1979 bytes (96%) of dynamic memory, leaving 69 bytes for local variables. Maximum is 2048 bytes. Low memory available, stability problems may occur. 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)

Have tried googling and don't see any solutions. For a similar issue here (https://github.com/arduino-libraries/WiFi101/issues/179) @sandeepmistry recommended opening an issue on this thread and so that's what I'm doing. Additional information, if helpful: using a Mac and an Arduino Uno board.

Again, as a brand-new user, some very specific instructions would be much appreciated! Thanks in advance!

gordinho21 commented 6 years ago

I have almost exactly this problem. Did one flash and now get same "error while erasing flash memory" when I try to flash to most current driver (19.5.4). Cant flash to any version using any version of the flash tool. Cant upload certificates , all get errors regarding flash memory. have feather m0 and model b winc1501

gordinho21 commented 6 years ago

CPU reset. 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)

facchinm commented 6 years ago

Hi @gordinho21 , ~~all WiFi101 produced by Arduino are mounting the rev A of WINC1500 module, so the latest firmware available (from Microchip) is 19.4.4 . Trying to flash 19.5.x will result in an error due to different flash sizes between the revisions. Could you post a photo of the module? Thanks!~~

sandeepmistry commented 6 years ago

Hi @rpkelley,

The WiFi101 shield contains rev A of the WINC1500 module, so the latest firmware is 19.4.4 as mentioned by @facchinm above. If you're not using an Arduino WiFi101 shield I suggest you contact the manufacturer of the hardware for support.

sandeepmistry commented 6 years ago

Hi @gordinho21,

I suggest you contact Adafruit support for this. We've only tested the procedure with the Arduino WiFi101 shield and the MKR1000. Other boards might have additional steps ...

fiftha7 commented 6 years ago

I don't know if this will help but it worked for me. In the instructions for updating the firmware it reads: "If you are using a Feather M0 or WINC1500 breakout, don't forget to update the pins as necessary with setPins()! If you are using a WiFi101 or WINC1500 shield, skip this step" I am using WiFi101 but I added WiFi.setPins(8,7,4,2) to the example firmware updater code anyway. After uploading the rest went smoothly.

texassiga commented 6 years ago

Unable to use this chip due to following issue:

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

Check result: NOT PASSED

I tried updating the firmware but I am getting "Error while erasing flash memory"

antellus commented 6 years ago

Same issue, using Adafruit Breakout.

I've gone through the instructions a few times. It seems like the board cannot be updated to 19.5.4. Along with that, I am receiving errors trying to upload a new ssl certificate. I'm guessing all would be Ok to keep using 19.5.2, as long as I can add new certificates.

Hardware: Arduino UNO BN: Arduino/Genuino Uno VID: 2A03 PID: 0043 SN: 95530343035351A04012

Adafruit WINC1500 Breakout ATWINC1500-MR210PB

Win10 Arduino 1.8.5 Sketch - CheckWif101FirmwareVersion

WiFi101 firmware check.

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

Check result: NOT PASSED

Sketch - FirmwareUpdater Writing | ################################################## | 100% 1.62s avrdude: 10046 bytes of flash written avrdude: verifying flash memory against ... avrdude: reading on-chip flash data: Reading | ################################################## | 100% 1.29s avrdude: verifying ... avrdude: 10046 bytes of flash verified avrdude done. Thank you.

WiFi101 Firmware Plug-in COM7 WINC1501 ModelB (19.5.4) Update Firmware 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) Update SSL Root Certificates java.lang.Exception: Error while reading flash memory. at cc.arduino.plugins.wifi101.flashers.java.FlasherSerialClient.readFlash(FlasherSerialClient.java:123) at cc.arduino.plugins.wifi101.flashers.java.JavaFlasher.uploadCertificates(JavaFlasher.java:127) at cc.arduino.plugins.wifi101.UpdaterImpl$4.run(UpdaterImpl.java:202)

antellus commented 6 years ago

Resolved! Hope this helps others.

I was missing the WiFi.setPins(8,7,4) from the FirmwareUpdater sketch. Or, at least when I changed this, it worked.

Related post at adafruit: https://forums.adafruit.com/viewtopic.php?f=25&t=130213&p=647600#p647600

It would be great if the WiFi class took the pin configuration as ctor params. I'm not sure what pin configuration or how this works on the shield, but it would be a great if these were preset at least for the breakout.

Also, if a datastream isn't able to be written/read on specific pins, it would also be great if the exception was handled, possible with a hint as to what pin. i.e., error streaming on CS, or IRQ, or RST, isn't available.

sandeepmistry commented 6 years ago

Please contact Adafruit support for any issues related to their WINC1500 products.

sandeepmistry commented 6 years ago

cc/ @ladyada

ladyada commented 6 years ago

hiya, yep its definitely in the guide and has been for a bit https://learn.adafruit.com/adafruit-winc1500-wifi-shield-for-arduino/updating-firmware

If you are using a Feather M0 or WINC1500 breakout, don't forget to update the pins as necessary with setPins()!

we'll make the warning bigger!

robertcasanova commented 6 years ago

Side note: i had the same issue also with setPins in code. Please be sure you have the latest available Arduino IDE with boards updated before trying Wifi firmware update. For me this fix the issue. Thx!

Clinerg59 commented 5 years ago

*.bin firmware pull-down only shows 19.4.4 in WiFi101/WiFiNINA Firmware Updater. What am I doing wrong?

Mimsseey commented 4 years ago

Hey yall, I've found solution for my problem which was very similar to this (also using MKR1000/WINC1500). I followed more info link after installing driver and library so I ran blink sketch with MKR1010 Wifi Board selected in IDE, which was auto-selected after plugging in the board and installing drivers.

https://forum.arduino.cc/index.php?topic=635941.0 <- THIS POST SOLVED EVERYTHING