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

USB superspeed peripherals Forum Discussions

Anonymous
Not applicable

I am initializing two threads to run HID and UVC endpoints. When I initialize both endpoints in one thread, the endpoint in the thread containing the initialization seems to work, but the other one doesn't. Does all of the USB initialization need to be in a single thread? If not, what are the rules for what has to be in one thread and what can be done in different threads?

0 Likes
2 Replies
Anonymous
Not applicable

Hi,

   

You can use the EP in the thread it was not initialized.

   

When you initialize the EPs in two different threads is it working for you?

   

What do you exactly mean by doesn't work? Which part of the code fails exactly?

   

Regards,

   

-Madhu Sudhan

0 Likes
Anonymous
Not applicable

I was able to figure out what the problem was. The error I was receiving was 0x42, which suggests that the USB hadn't been started yet. It turns out that one thread was hogging the processor, so I needed to add a sleep, so that the other thread would have a chance to initialize correctly. Thanks for the help.

0 Likes