Code Monkey home page Code Monkey logo

Comments (7)

whitequark avatar whitequark commented on September 26, 2024

That's quite strange. Can you capture a log with wireshark? I don't have any ideas offhand.

from libfx2.

mithro avatar mithro commented on September 26, 2024

The Numato Opsis is a little strange in that it has a setup where;
(a) The FX2 can reset the FPGA.
(b) The FPGA can reset the FX2.

This is done so;
(a) the FX2 can reset the FPGA during JTAG programming mode
(b) The FPGA can cause the FX2 to switch between different operating modes by supplying different FX2 firmware.

What could be happening is that the FX2 is somehow causing the FPGA to reset which in turn resets the FX2. There is a jump you can remove which prevents the FPGA from being able to do this reset. I think it's call JRST or something?

There is some info at https://opsis.hdmi2usb.tv/features/usb-peripheral.html but there are also some lies I have never got around to fixing.

from libfx2.

whitequark avatar whitequark commented on September 26, 2024

Yeah, I was wondering if something like that was happening. That sounds like the most likely explanation.

from libfx2.

jedrzejboczar avatar jedrzejboczar commented on September 26, 2024

Ok, thanks, this may be the problem. I'll test as soon as possible, so most likely on Monday.

from libfx2.

jedrzejboczar avatar jedrzejboczar commented on September 26, 2024

I tried removing the JFX2-RST jumper but it didn't fix the problem, so most likely this is not the FPGA resetting the FX2.

I checked the USB traffic using usbmon and Wireshark. I can see multiple BULK IN transfers (EP6) with responses from FX2 resulting in -EOVERFLOW, which in theory means too long data packet, but is probably related to random data on the line. I also tried disabling all the code available for responding on endpoint 6 in cdc example, but the problem still occurs.

The disabled by hub (EMI?), re-enabling... error in system logs comes from hub.c here, so the message is probably not related to disconnection or overcurrent (relevant discussion). And indeed shortly after those failing transfers there are GET_STATUS and CLEAR_GEATURE: C_PORT_ENABLE issued to the hub, which restarts the hub.

So this looks like some interference on the line, but the firmware from hdmi2usb works without a problem on the same hardware and I wonder what makes this CDC example fail.

As Wireshark shows only whole transfers, some random data may be sent which causes the hub to consider it as EMI. The problem seems similar to this one, which may suggest that it is somehow linux-specific, but I haven't tested it under Windows.

Another strange behavior is that when I switched kernel to older version (5.3.5 -> 4.19.78) usbtest driver gets loaded for the device. On 5.3.5 cdc_acm was being loaded correctly at first, but now after switching back to 5.3.5 from 4.19.78 usbtest is being loaded each time. After manually unbinding the driver and switching it to cdc_acm, the problem happens in the same way (but after restarting the hub usbtest gets loaded again).

In case this could be helpful I attach files with:

  • example wireshark capture (starting from packet 1413, FX2's usb.device_address == 14)
  • descriptors info from lsusb -v for both the libfx2 cdc example and hdmi2usb firmware from master.

from libfx2.

whitequark avatar whitequark commented on September 26, 2024

I have an OpenVizsla and a Numato Opsis. I'm fairly busy right now, but if @mithro wants we could arrange something to prioritize this issue.

from libfx2.

jedrzejboczar avatar jedrzejboczar commented on September 26, 2024

Indeed the problem was specific to Numato Opsis and it was the jumper, but it is somehow necessary to remove it before powering on the board, which I didn't suspect as the the problems happens only on a CDC data transfer, so it would seem that jumper could as well be removed after power-up.

Anyway the problem is not related to libfx2, so the issue can be closed.

from libfx2.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.