LPC 2468 USB HOST CDC ACM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC 2468 USB HOST CDC ACM

2,235 Views
deepakmadan
Contributor I

I am trying to connect a USB CDC ACM Device to my LPC2468 using Host on LPC. I am not able to get pass the CDC Stage for the Device.

The Device is USB2.0 Compliant and is using CDC ACM 1.1 with Class Specific interface.. and Bulk In , Bulk Out, Interrupt  Endpoint Descriptors.

My Host Controller detects the Device.

I Set the Configuration also after parsing all the Configuration Descriptors.

I have successfully sent CDC Set Control Line Request (Value: 0x00).

But while trying to Send CDC Set Line Encoding Request (my request fails).

Neither I am able to receive any data for CDC Get Line Encoding Request.

I also tried to read and send Data from Data Bulk In and Bulk Out Endpoints respectively. But I don't get any response or any data. Am i missing something?? 

Below are the Commands which were processed successfully sent in the same Order:

Get Device Descriptor
Set Address 1
Get Device Descriptor
Get Configuration Descriptor (Length - 8)
Get Configuration Descriptor (Length - 0x4B)
Set Configuration - 2 (2:: as Configuration Descriptor Mentioned Configuration Value - 2)

CDC Set Control Line Request (Value : 0x00, Interface : 0x00) (Class Type Request - Recipient Interface - Control Transfer)

The Following Command fails.

CDC Set Line Encoding ( Value: 0x00, Interface: 0x00, Length: 0x07 ) (Data:: Baud Rate: 115200, charFormat: 0, Parity : 0, DataBits: 8)
(Class Type Request - Recipient Interface - Control Transfer) ----

For Above Control Transfer: Setup Stage is Sent Successfully, But Data Out Stage is not Sent Successfully).

0 Kudos
3 Replies

1,368 Views
deepakmadan
Contributor I

Can someone share link for documentation of NXP USB Host Lite Stack. 

I am stuck at sending or Receiving data from Bulk In and Bulk Out Endpoints.

However, I can read data from Notification In Interrupt Endpoint.

Bulk In and Bulk Out are returning Error code as 0x0F (which is the Completion Code we set while sending)

Enumeration was completed successfully. I cross checked with the Device USB data Captured from Computer and i am doing the same thing.

Maybe i need to initialize something for the Endpoint headers or pointers? 

0 Kudos

1,368 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Deepak,

You could take a look at the following links, that may provide some help:
https://community.nxp.com/thread/417063

https://www.lpcware.com/content/forum/how-use-lpc4330-usb-cdc-host

http://docs.lpcware.com/nxpusblib/v0.94/group___group___u_s_b_class_c_d_c_host.html


Hope this will be useful for you.
Best regards!
/Carlos
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,368 Views
deepakmadan
Contributor I

Hi Carlos,

I have already gone through both the USB Stack and their Applications.

 I have used NXP Host Lite USB Stack to support CDC Drivers using its existing CTRLSend, CtrlRecv and ProcessTD Functions.

I crossed the paramters and data sent for SetLineCoding and SetControlLineState with these stacks and the one i used. All the data, format seems to be fine..

I could enumerate the device. But I get stuck while processing a  Control ACM Request for SetLineCoding or SetControlLine or GetControlLine. Any Control Request have dataLen = 0, gets executed. but for dataLen > 0, it is not accepting the request and my stack keeps on waiting for the Write Back Done Interrupt.

Could you suggest me any device which is easily available which supports CDC ACM? May be i need to change the device used and see if the issue is with my stack or with device driver.

One more thing.. for CDC ACM Driver.. my device is having one CS-Interface Descriptor. 

One IN Interrupt Endpoint, One Bulk In Endpoint, One Bulk Out Endpoint.

Do i need to send SetLineCoding or SetControlLine Request before sending or receiving data from my bulk Endpoints?

Do i need to do something with Halt or Stall Requests ?

My CDC ACM Device supports only following requests - SetLineCoding, SetControlLine, GetLineCoding, Notfication SerialState. 

Regards

Deepak

0 Kudos