what is the best way to have USB CDC on LPC1347

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

what is the best way to have USB CDC on LPC1347

777 Views
lpcware
NXP Employee
NXP Employee
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!
Labels (1)
0 Kudos
3 Replies

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by a_bet on Mon Mar 21 03:50:59 MST 2016
Hi, I have the same issue on Ubuntu Linux 14.04 and a Xpresso43s37 board.
I explained it in this post.
I have a warning saying
Quote:
pointer targets in passing argument 1 of 'vcom_write' differ in signedness [-Wpointer-sign]

in cdc_main.c . Any idea? What should I look for?

Thanks in advance!
0 Kudos

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by elgarbe on Mon Feb 16 04:49:56 MST 2015
It was a service pack issue. I test the example con win xp sp2 and it does not work. I test it con sp3 and work well.

Kind regards
0 Kudos

634 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nidalpres on Sun Feb 15 21:53:22 MST 2015
I have mine USB vcom port configured to 115200 8N1.

"Hello world" may or may not appear it really doesn't matter. What matters is that whatever you type into terminal it will echo it back to you (usbd_rom_cdc example).
0 Kudos