USB CDC example for LPC1343, communication problem

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

USB CDC example for LPC1343, communication problem

1,599 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LPCFER on Sun Apr 11 12:40:21 MST 2010
Hello all,

I'm trying to establish communication via virtual COM port trough USB connection. I'm using example provided by NXP for LPC1343, USBCDC.

I managed to make valid USB connection, when I connect LPC board with PC I get new LPC134x USB VCom Port. When I establish connection trough COM port (HyperTerminal or RealTerm) and send a character I don't get anything back.

Now, I don't know if i got the point of this example, but as I understood it should send back everything it recieves on serial port. I didn't change anything in code except baud rate in cdcuser.c, line 34, I tried different rates.

If anyone can give me some directions what should I do to make this work, cause I'm new to this platform and USB firmware in general. Is there any tutorial or manual available for this example?

I'm using LPCXpresso IDE, Build id: 2010-01-22 (v3.2.2).

Thank you all in advance,
Best regards,

Darko.
0 Kudos
Reply
6 Replies

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Thu Oct 06 03:00:00 MST 2011
The USBCDC example does not automatically send back everything you send on the VCOM port; you must connect TXD&RXD. A software implementation can be found in this thread: http://knowledgebase.nxp.com/showthread.php?t=1980

  A bit of explanation on how to use the USB CDC example with the LPCXpresso baseboard and use the jumper short between TXD and RXD:
  
  You can short TXD and RXD by placing a jumper on the expansion connector on the baseboard
  Place the jumper between:
  PIO1_6-RXD = Expansion connector J5 pin 23
  PIO1_7-TXD = Expansion connector J5 pin 24
  
  There is a multiplexer (U25) that selects the connected peripheral to the PIO1_6-RXD and PIO1_7-TXD signals. We don’t want the TXD/RXD multiplexer to interfere with our signals, so remove jumper INH to disable it; pin 5-6 of J7.
  You can connect a mini-USB cable to X1, as described in the LPCXpresso Base Board - User’s Guide on page 40.
  
  When the USBCDC example is downloaded to the board and executed, the PC will recognize a USB "VCOM" device. Point windows to lpc134x-vcom.inf, located in the usbcdc project directory. This is the workspace directory where you extracted the example projects to.
 
Hope this helps.
0 Kudos
Reply

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrew24 on Sat Apr 17 01:29:18 MST 2010

Quote: LPCFER
Hello again...

I just figured it out... This example is transciever... it just forwards data from USB to txd on LPC, and data from rxd back to USB...  So if you want it to loop back data from HyperTerminal just make a jumper from rxd to txd on LPC :) (that's easier way just to see if it works)... Now I'll try to write the code that does that without the jumper...

Hope this helps someone, I lost whole day to figure what this does because this demo is useless and bad documented...

Also try this document, this helped me a lot:
http://www.atmel.com/dyn/resources/prod_documents/doc6269.pdf

Regards.



Helllo, LPCFER. Did you succeded sending/receiving data without the jumper? I don't understand why they use Tx and Rx pins.The packet received from host is sent to lpc1343 directly, so why send it to txd one more time??
0 Kudos
Reply

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Sun Apr 11 19:54:59 MST 2010

Quote: LPCFER
Hello again...

I just figured it out... This example is transciever... it just forwards data from USB to txd on LPC, and data from rxd back to USB...  So if you want it to loop back data from HyperTerminal just make a jumper from rxd to txd on LPC :) (that's easier way just to see if it works)... Now I'll try to write the code that does that without the jumper...

Hope this helps someone, I lost whole day to figure what this does because this demo is useless and bad documented...

Also try this document, this helped me a lot:
http://www.atmel.com/dyn/resources/prod_documents/doc6269.pdf

Regards.



Okay, the LPC1342 is cheaper than an FT232, and has lots of power.

Excellent also the Atmel documentation, they offer explanations even for Linux.

Thank you.
0 Kudos
Reply

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LPCFER on Sun Apr 11 18:26:43 MST 2010
You can find all examples on LPCXpresso support web site:

http://ics.nxp.com/support/lpcxpresso/

and the usbcdc example is included here (for LPC13xx series):

http://ics.nxp.com/support/lpcxpresso/zip/lpc1343.examples.zip
0 Kudos
Reply

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by caprock on Sun Apr 11 17:14:44 MST 2010
Can you please give me the link that you used for the usbcdc sample?
0 Kudos
Reply

1,280 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LPCFER on Sun Apr 11 15:25:04 MST 2010
Hello again...

I just figured it out... This example is transciever... it just forwards data from USB to txd on LPC, and data from rxd back to USB...  So if you want it to loop back data from HyperTerminal just make a jumper from rxd to txd on LPC :) (that's easier way just to see if it works)... Now I'll try to write the code that does that without the jumper...

Hope this helps someone, I lost whole day to figure what this does because this demo is useless and bad documented...

Also try this document, this helped me a lot:
http://www.atmel.com/dyn/resources/prod_documents/doc6269.pdf

Regards.
0 Kudos
Reply