LPC4370 USB CDC VCOM Questions

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

LPC4370 USB CDC VCOM Questions

1,459 Views
mtenw
Contributor I

Hi,

I have been trying the usbd_rom_cdc_vcom example of lpcopen 2.12 on the LPC-Link2 board. I was able to send the data from the LPC-Link2 board to a USB host, both PC and Mac. However, the maximum TX packet size the vcom_write() (or USBD_API->hw->WriteEP()) seems to be capped at 16,384 bytes. When the vcom_write() is called to send 32,768 bytes, it returns 32,768. That means the data is successfully sent. However, the USB hosts (both PC and Mac) do not receive the 32,768 bytes of data. I have seen other discussion saying the maximum number of bytes in a packet is 64 bytes, but it is for a LPC1769 (See http://community.nxp.com/thread/429714).

Questions:

1. What is the maximum packet size the vcom_write() can send on LPC4370 (LPC-Link2 board)? Can users adjust any settings to increase the maximum packet size?

2. To send high speed USB data to a USB host, some discussions recommended bulk transfer. What is the recommended example to start with? Both usbd_rom_cdc_vcom and usbd_rom_libusb use bulk transfer. Which one should be used?

3. What application is recommended on the USB host to capture the data? Or we need to write a customized application (e.g. based on libusb) to get better performance?

Thank you very much for the help!

Labels (2)
0 Kudos
3 Replies

862 Views
damihuanghuang
Contributor I

Hi, mtenw, 

Would pls share your development of USB CDC communication with MAC OSX? Do we need a USB CDC driver for the LPC4370? What is the MAC Software did you use to get the USB DATA?

Thank you a lot! 

Frank

0 Kudos

862 Views
mtenw
Contributor I

I believe MAC OSX will detect a USB virtual com port if a USB CDC device is connected, no additional driver is required. Any terminal program should work. I used CoolTerm.

0 Kudos

862 Views
mtenw
Contributor I

After further testing, the maximum number of bytes vcom_write() can send is 32,767 bytes. Is this a known problem on LPC-Link2? Any comments on this?

0 Kudos