MarsTechHAN / ch552tool

An open sourced python tool for flashing WCH CH55x series USB microcontroller with bootloader v2.30, v2.31 & v2.40.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

fabiodl opened this issue · comments

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

the error is removed reverting this commit. If it helps, I am using a ch559
964ee3a