AnsweredAssumed Answered

What do I need to change to get the SSL USB driver working in VDK?

Question asked by JonEvans on Jun 27, 2011
Latest reply on Jul 4, 2011 by MartinK

I have an application for a BF547 custom board, and it has a working USB stack using the system services driver.  I decided to try running VDK on the board instead of bare-metal code, because I have a use case for multithreading.  In the old (non-VDK) code, I am using the SSL's DCB manager and USB device driver, and everything works well--it's basically a slightly modified version of the demo USB code from the BF548 EZ-KIT example.

 

The problem comes when I try porting to VDK... I have a thread do the USB driver startup, which works OK, and I have the main userland logic pending on a semaphore from the USB callback.  The problem is, the USB driver doesn't seem to correctly handshake with the host.  When I plug in the cable, it detects a reset--the callback fires, and the semaphore posts--but it doesn't follow through with the enumeration, and the callback never fires again (until I replug the cable).

 

I have read all the documentation I can find on VDK and SSL, but I can't figure out if there is anything I need to do differently to make the USB driver work well in a multithreaded environment.  Any pointers on areas to check?

 

EDIT: I just tried starting from scratch with a new VDK application.  All I did was enable the UART, add the USB driver, and add in my (working in non-VDK) function to open the USB driver and wait for commands from the host.  Same behavior, so it isn't any of the other things my real application does in other threads (presumably).

Outcomes