-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USBTMC: Fixes and support for high-speed USB #1531
Conversation
….0.0 for all cases.
Thinking more, it would be good to have a way to clear the event queue of transfers on the particular endpoint during the clear_feature call, but we can leave that for another day. This patch is a step in the proper direction. |
sorry for late response, I will pull out one of my board with HS to test with as soon as I could :) . |
Great. Let me know if you have any questions. Do you use Windows? If not, I believe that Linux comes with a kernel driver for USBTMC, which will operate with python's pyvisa library. On Windows, the driver I mentioned comes with the "NI MAX" software that allows manual interaction with the device. In the tinyusb USBTMC example, I do have a python script that runs a number of testcases using pyvisa (which is how I found this bug, though it is intermittent). I'm also contemplating creating testcases for the CLEAR_FEATURE bug. I don't think that's possible with the standard USBTMC drivers, so it would need to use something like libusb, which makes it less convenient to run on Windows. |
I updated this branch to fix #1532. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb! Thank you very much for your PR, and sorry for late response. I have got into too many issues lately :)
Were you able to do testing with HS USB to confirm it works? |
I would love to, but not yet. The changes look great, but you are right, it may not be enough. I will try to pull out my old windows laptop and get it set up to test with. Will post the testing result here as soon as I could. |
While I've been using Windows... Linux does have USBTMC support, though I don't know if it'd run into the same ENDPOINT_HALT bug or not. |
Thanks for the reminder, to be honest, I haven't tried usbtmc before, I will give it a try this week. |
This updates USBTMC so that it should work with USB high-speed (untested, I don't have a HS device handy...).
It also fixes a few existing bugs:
The fix for the endpoint halt clearing likely should be put in the USBD core itself, instead of the class driver, but that's up for discussion. The USB488 spec mentions that the class may want to prevent the HALT from being cleared... I'd be happy for this patch to be merged, and then I can propose a larger fix.