This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

USB HOST CDC-ACM CLASS DRIVER in starterware

Dear all,

              We are working on to write a CDC-ACM (HOST) class Driver in starter ware by taking usb  MSC and HID Class  a skeleton for the Development.We are succeeded up to the enumeration by calling USBHCDMain() function repeatedly.We are Facing some problems in Data Handling Stage.

For Initial development  i have taken a Profilic BAFO, it is a USB-Serial Converter(VENDOR SPECIFIC CLASS) and registers the driver as a VENDOR_SPECIFIC and seems works fine up to the enumeration.In  the Data Handling stage registers the call back functions to handle the data and notified to the application. i am Trying to loop back the data which are coming from the PC which is connected to the EVM USB(host) by using null modem cable.

we can add some structures,which are specific to CDC-ACM Class and handle the Enumeration.

we are  facing some problems during the development phase.

1.How can i set the baud rate(comm parameters) for the Device?

2.As a host it has to handle the data at a specified rate,How can i achieve the task in the starter ware?

3.we are giving call back to the IN End point,but it is not notified to the call back when the data is available?

For the interrupt end points there is polling time interval and schedule the events based on the Polling time,but in case of the BULK Endpoints,the polling time is zero.

4.How Host will do the IN Transactions(tokens) to the Device?

Thanks & Regards

Rama Krishna

   

 

 

   

  • rama krishna said:
    1.How can i set the baud rate(comm parameters) for the Device?

    I don't know if this is really possible/necessary. Isn't such a device always running on maximum speed of 1,5 Mbit and baud rate set on host does not matter?

  • Thanks Hans,

                          i would like to know if there is any examples and driver for CDC-ACM Host class in bare metal.

    Thanks & regards

    Rama Krishna

  • Hi Rama Krishna,

    In StarterWare we do not have any host examples demonstrating CDC- ACM host . You may please refer the device CDC-Serial example to get a feel of the working of a CDC Serial device.  As you have started , you would need 3 pipes 1 interrupt and 2 bulk pipes for transporting serial data.   I have attached Lecroy traces for a USB to serial converter and hope it comes of use. 

    Please refer the USB .org CDC class specification so that basic questions would become clear to you.

    1.How can i set the baud rate for the Device?

    Ans :Use SET_LINE_CODING class specific interface message -  

    2.As a host it has to handle the data at a specified rate,How can i achieve the task in the starter ware?

    Ans :It would be better if you could explain the application better as I am unable to understand the context for the question. A simple answer would be to calculate a timer value depending on the baud rate chosen, and on timer expiry push the data out.  As a host you decide when to send the data and you would also keep polling the bulk In end point all the time.  

    3.we are giving call back to the IN End point,but it is not notified to the call back when the data is available?

    Ans : You need to help me better with some context . How do you know that you have received data. I guess it must be on bulk IN end point.

    4.How can i send the IN tokens for the data to the Device?

    Please refer the existing MSC code for the above question.

     

     

  • Hi vineeth,

                      Thanks for your reply, i will go a head with Ur suggestions and will come back to u.

    Thanks & Regards

    Rama Krishna 

  • 2728.CDC_SERIAL_HOST_FS_enum_complete.zip

    Please find the attachment which contains a trace of a Serial to USB converter.