lpcware

what is the best way to have USB CDC on LPC1347

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by elgarbe on Mon Dec 01 04:36:24 MST 2014
I search on the web and I found nxpUSBLib, but it seems to be obsolet a buggy, then I found LPCOpen 2.xx so I try to test it:

I have LPCXpresso v6.1.4_194 IDE, I download
http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc13xx-packages
and
http://www.lpcware.com/content/nxpfile/lpcopen-software-platform-usbd-library-drivers-windows

I start a new workspace and import LPCopen software. I fouse on usbd_rom_cdc example
I compile it and I jus have a warning:

Building file: ../example/src/cdc_main.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_LPCOPEN -DCORE_M3 -I"D:\Mis documentos\DropBox\ARM LPC\GARBE\LPC1347_LPCOpen\lpc_chip_13xx\inc" -I"D:\Mis documentos\DropBox\ARM LPC\GARBE\LPC1347_LPCOpen\lpc_board_nxp_lpcxpresso_1347\inc" -I"D:\Mis documentos\DropBox\ARM LPC\GARBE\LPC1347_LPCOpen\usbd_rom_cdc\example\inc" -I"D:\Mis documentos\DropBox\ARM LPC\GARBE\LPC1347_LPCOpen\lpc_chip_13xx\usbd_rom\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m3 -mthumb -MMD -MP -MF"example/src/cdc_main.d" -MT"example/src/cdc_main.d" -o "example/src/cdc_main.o" "../example/src/cdc_main.c"
../example/src/cdc_main.c: In function 'main':
../example/src/cdc_main.c:181:4: warning: pointer targets in passing argument 1 of 'vcom_write' differ in signedness [-Wpointer-sign]
D:\Mis documentos\DropBox\ARM LPC\GARBE\LPC1347_LPCOpen\usbd_rom_cdc\example\inc/cdc_vcom.h:117:10: note: expected 'uint8_t *' but argument is of type 'char *'
Finished building: ../example/src/cdc_main.c


it's for this line:


vcom_write("Hello World!!\r\n", 15);


So, I start a debug session, press run, plug a USB cable from uUSB on LPCXpresso board (uC side) to my USB PC, windows ask for a driver, so I select the path to "lpcopen-software-platform-usbd-library-drivers-windows", then windows install driver's and I can see a new COM port (COM4).
I open hyperterminal, select com4 and clik on connect.... nothing happend, I expect a "Hello World!!\r\n" message, but nothing.

So I asking myself how do I configure COM4 port? it's 9600 8N1?

am I doing something wrong?

Is there any working example/library for USB CDC comunication?

Thk and best regards!

Outcomes