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

1.7.5 gets stuck while loading #53

Closed
dhalbert opened this issue Jul 25, 2023 · 1 comment · Fixed by #54
Closed

1.7.5 gets stuck while loading #53

dhalbert opened this issue Jul 25, 2023 · 1 comment · Fixed by #54
Assignees

Comments

@dhalbert
Copy link

dhalbert commented Jul 25, 2023

On MatrixPortal M4, loading 1.7.5 from release artifacts fails at 41% with esptool.py, and also fails with https://adafruit.github.io/Adafruit_WebSerial_ESPTool/. In both cases I erased the ESP32 flash beforehand.

Re-uploading 1.7.4 after erasing again works fine.

Tested with webtool at both 115200 and 921600 baud.

Other users reported similar problems here: https://forums.adafruit.com/viewtopic.php?p=980409#p980409 and in discord.

ESP Web Flasher loaded.
Connecting...
Connected successfully.
Try hard reset.
Chip type ESP32
Connected to ESP32
MAC Address: 7C:9E:BD:DC:C9:24
Uploading stub...
Running stub...
Stub is now running...
Detecting Flash Size
FlashId: 0x164020
Flash Manufacturer: 20
Flash Device: 4016
Auto-detected Flash size: 4MB
Erasing flash memory. Please wait...
Finished. Took 16515ms to erase.
Image header, Magic=0xFF, FlashMode=0xFF, FlashSizeFreq=0xFF
Writing data with filesize: 1160192
Erase size 1160192, blocks 71, block size 0x4000, offset 0x0000, encrypted no
Error: SlipReadError: Timed out waiting for packet header
To run the new firmware, please reset your device.
[Object.debug:191] Finished read loop
$ esptool.py --port /dev/ttyACM1 --before no_reset --baud 115200 write_flash 0 NINA_W102-1.7.5.bin 
esptool.py v4.4
Serial port /dev/ttyACM1
WARNING: Pre-connection option "no_reset" was selected. Connection may fail if the chip is not in bootloader or flasher stub mode.
Connecting.......
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting....
Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 7c:9e:bd:dc:c9:24
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Flash will be erased from 0x00000000 to 0x0011bfff...
Compressed 1160192 bytes to 634996...
Writing at 0x00092eea... (41 %)Traceback (most recent call last):
  File "/home/halbert/.local/bin/esptool.py", line 34, in <module>
    esptool._main()
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/__init__.py", line 1026, in _main
    main()
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/__init__.py", line 826, in main
    operation_func(esp, args)
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/cmds.py", line 556, in write_flash
    esp.flash_defl_block(block, seq, timeout=timeout)
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/loader.py", line 109, in inner
    return func(*args, **kwargs)
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/loader.py", line 991, in flash_defl_block
    self.check_command(
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/loader.py", line 407, in check_command
    val, data = self.command(op, data, chk, timeout=timeout)
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/loader.py", line 376, in command
    p = self.read()
  File "/home/halbert/.local/lib/python3.10/site-packages/esptool/loader.py", line 308, in read
    return next(self._slip_reader)
StopIteration
@dhalbert
Copy link
Author

NINA-FW 1.7.5 failed to upload completely on MatrixPortal M4, PyPortal M4, etc. After experimentation, I narrowed down the problem to something involving the Adafruit SAMD Arduino USB stack. Using TinyUSB instead fixes the problem. See adafruit/Adafruit_Learning_System_Guides#2582. New versions of the passthrough were uploaded to https://learn.adafruit.com/upgrading-esp32-firmware/upgrade-all-in-one-esp32-airlift-firmware#upload-passthrough-code-3124109.

With the change above, 1.7.5 uploads properly with esptool.py and the Web ESPTool.

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

Successfully merging a pull request may close this issue.

2 participants