You are not logged in.

#1 2024-08-19 11:25:44

cumcat0
Member
From: Poland
Registered: 2024-06-29
Posts: 3
Website

Problems while using ch341a programmer.

So I'm trying to flash a coreboot img to WINBOND W25Q128BV chip using my main desktop machine with an arch linux installation on it.
lsusb detects my programmer normally but when I'm trying to read data from the chip I get:

cb_out: error: LIBUSB_TRANSFER_TIMED_OUT
ch341a_spi_send_command: Failed to write 67683 bytes

cb_out: error: LIBUSB_TRANSFER_TIMED_OUT
enable_pins: Failed to write 9 bytes
Could not disable output pins.

Then follows:

cb_out: error: LIBUSB_TRANSFER_TIMED_OUT
config_stream: Failed to write 3 bytes
Could not configure stream interface.

lsusb output before I attempt reading from my bios chip:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 1462:7c56 Micro Star International MYSTIC LIGHT 
Bus 001 Device 004: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 001 Device 005: ID 03f0:089d HP, Inc HyperX Cloud III
Bus 001 Device 016: ID 1a86:5512 QinHeng Electronics CH341 in EPP/MEM/I2C mode, EPP/I2C adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 003 Device 003: ID 1038:1634 SteelSeries ApS SteelSeries Apex 9 TKL
Bus 003 Device 004: ID 1532:007e Razer USA, Ltd RC30-030502 Mouse Dock
Bus 003 Device 005: ID 1532:007b Razer USA, Ltd RC30-0305 Gaming Mouse Dongle [Viper Ultimate (Wireless)]
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

lsusb output after an attempt to read from the bios chip:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 001 Device 003: ID 1462:7c56 Micro Star International MYSTIC LIGHT 
Bus 001 Device 004: ID 8087:0029 Intel Corp. AX200 Bluetooth
Bus 001 Device 005: ID 03f0:089d HP, Inc HyperX Cloud III
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub
Bus 003 Device 003: ID 1038:1634 SteelSeries ApS SteelSeries Apex 9 TKL
Bus 003 Device 004: ID 1532:007e Razer USA, Ltd RC30-030502 Mouse Dock
Bus 003 Device 005: ID 1532:007b Razer USA, Ltd RC30-0305 Gaming Mouse Dongle [Viper Ultimate (Wireless)]
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

dmesg output shows as follows:

[ 2879.334268] usb 1-2.3: new full-speed USB device number 16 using xhci_hcd
[ 2879.505806] usb 1-2.3: New USB device found, idVendor=1a86, idProduct=5512, bcdDevice= 3.04
[ 2879.505812] usb 1-2.3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 2879.505815] usb 1-2.3: Product: USB UART-LPT
[ 2879.523187] spi-ch341-usb 1-2.3:1.0: ch341_cfg_probe: output cs0 SPI slave with cs=0
[ 2879.523193] spi-ch341-usb 1-2.3:1.0: ch341_cfg_probe: output cs1 SPI slave with cs=1
[ 2879.523195] spi-ch341-usb 1-2.3:1.0: ch341_cfg_probe: output cs2 SPI slave with cs=2
[ 2879.523197] spi-ch341-usb 1-2.3:1.0: ch341_cfg_probe: input  gpio4 gpio=0 irq=0 (hwirq)
[ 2879.523200] spi-ch341-usb 1-2.3:1.0: ch341_cfg_probe: input  gpio5 gpio=1 irq=1 
[ 2879.523323] spi-ch341-usb 1-2.3:1.0: ch341_spi_probe: SPI master connected to SPI bus 0
[ 2879.523402] spi-ch341-usb 1-2.3:1.0: ch341_spi_probe: SPI device /dev/spidev0.0 created
[ 2879.523439] spi-ch341-usb 1-2.3:1.0: ch341_spi_probe: SPI device /dev/spidev0.1 created
[ 2879.523475] spi-ch341-usb 1-2.3:1.0: ch341_spi_probe: SPI device /dev/spidev0.2 created
[ 2879.523636] spi-ch341-usb 1-2.3:1.0: ch341_usb_probe: connected
[ 2939.899756] spi-ch341-usb 1-2.3:1.0: ch341_usb_disconnect: disconnected
[ 2956.191453] usb 1-2.3: reset full-speed USB device number 16 using xhci_hcd
[ 2956.266154] usb 1-2.3: device descriptor read/64, error -32
[ 2956.446448] usb 1-2.3: device descriptor read/64, error -32
[ 2956.626459] usb 1-2.3: reset full-speed USB device number 16 using xhci_hcd
[ 2956.699793] usb 1-2.3: device descriptor read/64, error -32
[ 2956.879534] usb 1-2.3: device descriptor read/64, error -32
[ 2957.059799] usb 1-2.3: reset full-speed USB device number 16 using xhci_hcd
[ 2957.087047] usb 1-2.3: Device not responding to setup address.
[ 2957.324040] usb 1-2.3: Device not responding to setup address.
[ 2957.533055] usb 1-2.3: device not accepting address 16, error -71
[ 2957.606129] usb 1-2.3: reset full-speed USB device number 16 using xhci_hcd
[ 2957.633750] usb 1-2.3: Device not responding to setup address.
[ 2957.869749] usb 1-2.3: Device not responding to setup address.
[ 2958.076139] usb 1-2.3: device not accepting address 16, error -71
[ 2958.078797] usb 1-2.3: USB disconnect, device number 16
[ 2958.152859] usb 1-2.3: new full-speed USB device number 17 using xhci_hcd
[ 2958.252868] usb 1-2.3: device descriptor read/64, error -32
[ 2958.432848] usb 1-2.3: device descriptor read/64, error -32
[ 2958.616146] usb 1-2.3: new full-speed USB device number 18 using xhci_hcd
[ 2958.716276] usb 1-2.3: device descriptor read/64, error -32
[ 2958.896293] usb 1-2.3: device descriptor read/64, error -32
[ 2959.006001] usb 1-2-port3: attempt power cycle
[ 2959.599777] usb 1-2.3: new full-speed USB device number 19 using xhci_hcd
[ 2959.627040] usb 1-2.3: Device not responding to setup address.
[ 2959.863750] usb 1-2.3: Device not responding to setup address.
[ 2960.072859] usb 1-2.3: device not accepting address 19, error -71
[ 2960.149533] usb 1-2.3: new full-speed USB device number 20 using xhci_hcd
[ 2960.176771] usb 1-2.3: Device not responding to setup address.
[ 2960.413766] usb 1-2.3: Device not responding to setup address.
[ 2960.622876] usb 1-2.3: device not accepting address 20, error -71
[ 2960.625966] usb 1-2-port3: unable to enumerate USB device

Things I tried:

  • Using IMSProg instead of flashrom.

  • Reinstalling libusb.

  • Installing driver for my programmer instead of using the stock kernel one.

Any help would be much appreciated! Thanks!


womp womp

Offline

#2 2024-08-19 16:28:58

xerxes_
Member
Registered: 2018-04-29
Posts: 900

Re: Problems while using ch341a programmer.

1. What kernels did you tried (maybe try linux-lts)?
2. What usb ports did you tried: 1.0, 2.0, 3.0 or higher standard?
3. Unplug not needed things from usb ports and try again.
4. You may try this, but if 'use_both_schemes=y' will not work then try 'use_both_schemes=1'.

Edit:
Looks like 'use_both_schemes' is already set on arch standard linux kernel:

cat /sys/module/usbcore/parameters/use_both_schemes 
Y

Last edited by xerxes_ (2024-08-19 16:51:27)

Offline

#3 2024-08-19 17:28:55

cumcat0
Member
From: Poland
Registered: 2024-06-29
Posts: 3
Website

Re: Problems while using ch341a programmer.

xerxes_ wrote:

1. What kernels did you tried (maybe try linux-lts)?
2. What usb ports did you tried: 1.0, 2.0, 3.0 or higher standard?
3. Unplug not needed things from usb ports and try again.
4. You may try this, but if 'use_both_schemes=y' will not work then try 'use_both_schemes=1'.

Edit:
Looks like 'use_both_schemes' is already set on arch standard linux kernel:

cat /sys/module/usbcore/parameters/use_both_schemes 
Y

1. I am on linux-lts kernel.
2. I've tried all ports available on my computer but unfortunately to no avail, I have usb ports 2.0 and 3.0.
3. I have only my mouse, keyboard and headphones plugged in but I will make an attempt without my headphones.
4. Use both schemes is set to true.
Thanks for the reply!


womp womp

Offline

#4 2024-09-08 19:56:45

o_caino
Member
Registered: 2013-06-06
Posts: 167

Re: Problems while using ch341a programmer.

Any news on this?
I'm getting the same errors.
I even tried another distro, but nothing changed.

Offline

Board footer

Powered by FluxBB