Thursday 5 May 2016

USB Driver Development - Windows

There are many low cost controllers/ development boards  have USB support


1. STM32f4_discovery  



2. TM4c123
     


3.PSOC5 

They have buildin pheripherals like I2C, SPI, UART , CAN ... Making a protocol converter/ other controllers using these devices makes the price compatative ..

There are 4 ways one can write driver to these devices

1. Libusb 
2.WinUSB
3.Custom Drivers
4.CDC /Serial Driver

Libusb 
             Libusb is best for devices which requires support to other OS like Linux , MAC OS , BSD ..
It maintains common calling conventions & data structures across defferent platforms .. 

Application 
       |
User Mode Driver (dll)
       |
Kernel Mode Driver (Sys)
       |
USB Host Driver (Comes along with OS)


WinUSB 
            WinUSB only work with Windows platform .. 

Application 
       |
User Mode Driver (dll)
       |
Kernel Mode Driver (Sys)
       |
USB Host Driver (Comes along with OS)

Custom Drivers :
              Instead of using the above two drivers one can prefer to write a custom driver & maintain proprietary  issues , avoid exposing the data transfer format/ protocol .. [Still some one can hook a  USB analyser & see whats happening ]

Application 
       |
User Mode Driver (dll)
       |
Kernel Mode Driver (Sys)
       |
USB Host Driver (Comes along with OS)


Virtual Serial Driver :
              This way one can avoid supplying a driver for the device & use the pre-supplied windows USB class drivers ..

Application 
       |
Serial Port Accessing Interface 

Red Color Shows work required to do... Green - driver /Software already available ..


No comments:

Post a Comment