MarsTechHAN / ch552tool

An open sourced python tool for flashing WCH CH55x series USB microcontroller with bootloader v2.30, v2.31 & v2.40.
GNU General Public License v3.0
158 stars 24 forks source link

usb.core.USBError: [Errno 32] Pipe error #33

Open fabiodl opened 1 year ago

fabiodl commented 1 year ago

On freshly installed manjaro, anyt suggestions on what to try?

python3 -m ch55xtool -f build/spi/spi.bin -r Found CH559 with SubId:17 BTVER:02.40 UID:BE-41-BF-48-00-00-00-00 Erasing chip flash. Done. Flashing chip. Done. Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/fabio/.local/lib/python3.11/site-packages/ch55xtool/main.py", line 12, in sys.exit(_main()) ^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/ch55xtool/ch55xtool.py", line 898, in main ret, ret_pl = end_flash_ch5xx(dev, restart_after = args.reset_at_end) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/ch55xtool/ch55xtool.py", line 388, in __end_flash_ch5xx return cmd_exec(dev, "End", cmd_pl) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/ch55xtool/ch55xtool.py", line 141, in cmd_exec return cmd_reply_receive(dev, cmd_bin) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/ch55xtool/ch55xtool.py", line 123, in cmd_reply_receive reply = ep_in.read(ep_in.wMaxPacketSize, USB_MAX_TIMEOUT) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/usb/core.py", line 423, in read return self.device.read(self, size_or_buffer, timeout) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/usb/core.py", line 1029, in read ret = fn( ^^^ File "/home/fabio/.local/lib/python3.11/site-packages/usb/backend/libusb1.py", line 846, in bulk_read return self.read(self.lib.libusb_bulk_transfer, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/fabio/.local/lib/python3.11/site-packages/usb/backend/libusb1.py", line 954, in __read _check(retval) File "/home/fabio/.local/lib/python3.11/site-packages/usb/backend/libusb1.py", line 604, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 32] Pipe error Finalize communication.make: *** [../ch55x/Makefile:78: flash] Error 1

fabiodl commented 1 year ago

the error is removed reverting this commit. If it helps, I am using a ch559 https://github.com/MarsTechHAN/ch552tool/commit/964ee3a51170b0c2c8e39c21f0ab6c93ab064a6b