Closed juanmard closed 4 years ago
I believe I've resolved it, see chain here: https://twitter.com/NvrCast/status/1273614583211520004 and solution posted here: https://discourse.tinyfpga.com/t/usb-communication/613/65
The issue is that when wLength exceeds 8 bits, it wraps over and usbserial returns less bytes than it should
https://github.com/davidthings/tinyfpga_bx_usbserial/blob/master/usb/usb_serial_ctrl_ep.v#L106-L108
This can happen because Windows (WHY!?) requests a very large Descriptor size, 265 bytes exactly.
A fix for this has been merged, are you able to check if the problem is resolved for you @juanmard ?
Yeeeessss! Now it's ok!
No error and example "hello_world" running... Thanks! ;)
Fantastic! Glad to see this is fixed for you!
I am testing with a TinyFPGA-BX and I get strange behavior regarding the original bootloader. In the current configuration I can access the bootloader (COM6). It reacts correctly by sending you byte (0x00) and loads the user bitstream. In device manager everything is correct (in Spanish... :-)).
Loading the new "tinyfpga_bx_usbserial" stops accessing the port and Windows 10 reacts with a warning (also happens with the "hello_world" of @nalzok) giving an error 0x0A.
I have tested it on a GNU/Linux distribution (Debian) and everything works perfectly however. I suppose it is because of the CDC-ACM driver, but I don't understand what difference there is so that with the bootloader it works and with this other bitstream not. Any clues?