FX3 UVC Extension Unit

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello all,

I am currently trying to understand how the UVC host application works. Code is from the zip file linked to by this thread: UVC Extension unit

The host application allows you to either get or set the current firmware version on the FX3. It seems the parameters for the function "SetGetExtensionUnit" (host application) dictate which control is to be executed on the FX3 side. The "dwExtensionNode" parameter  is commented as the "XU Node ID" on line 187. Is this supposed to be the "bUnitID" from the Extension unit descriptor? In the host application code, "dwExtensionNode" is set to 2, while the extension unit descriptor "bUnitID" is valued at 3. The processor unit in the UVC header has a "bUnitID" set to 2, so are we actually calling the processor unit with the host application code?

The next parameter in "SetGetExtensionUnit" is "xuPropertyId"; commented as "XU control ID" on line 188. I assume this is the control ID with possible values ranging from 1 to 31. Assume I wanted to make an exact copy of the Firmware control but instead make it control number 2. I would have to edit the extension unit descriptor such that "bNumControls" was set to 0x02, and "bmControls" was set to 0x03, 0x00, 0x00. In the "UVCHandleExtensionUnitRqts" function on the FX3, I would have to add a case to the switch statement for "wValue", which would recognize control 0x0200 as my copy of the firmware code. I should then be able to edit the host application, so that "xuPropertyId" was set to 2, and I could then get and set the firmware just as if the parameter was set to 1. Unfortunately this does not work, so my understanding is flawed.

This is one of the last major milestones in my project, and would greatly appreciate any help you can offer, thanks.

0 Likes
1 Solution
Anonymous
Not applicable

I (somewhat) regret stating that mere minutes after posting my question I figured out my issue. I have been editing the descriptor for USB Full speed mode (the first descriptor defined in the .c file) instead of the superspeed descriptor. I will close the discussion myself, however I believe the information posed in the question is correct and may be of use to someone trying to learn how this all works. Thanks.

View solution in original post

0 Likes
1 Reply
Anonymous
Not applicable

I (somewhat) regret stating that mere minutes after posting my question I figured out my issue. I have been editing the descriptor for USB Full speed mode (the first descriptor defined in the .c file) instead of the superspeed descriptor. I will close the discussion myself, however I believe the information posed in the question is correct and may be of use to someone trying to learn how this all works. Thanks.

0 Likes