lpcopen v2.10 - USB on 17xx devices

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

lpcopen v2.10 - USB on 17xx devices

1,014 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sipiyou on Fri Mar 06 09:35:00 MST 2015
Hi everyone.

I am currently having some issues with lpcopen and the usb device support.

Issue1:
I can only find the precompiled lib under .../lpc_chip_177x_8x/libs. How can I get the full source for selfcompiling ?
Those parts which located under ./lpcusblib_KeyboardHost/ and ./lpcusblib_MassStorageHost/ are not complete.

Issue2:
I am trying to get usbd_lib_cdc/ example running. Compile works but USB is not recognized by pc. Just to mention, I got a custom PCB and I am using my old cmsis code - usb works flawlessly therefore I do not see any hardware issues.

At this point I modified the initialization code to usb port 0 but nothing happens. What value is supposed to be used for usb_param.usb_reg_base = LPC_USB_BASE for port 0 ?
The example addes 0x200 to that value but what is the right value for port 0 ?

Thanks!
Labels (1)
0 Kudos
Reply
3 Replies

766 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sipiyou on Mon Mar 09 06:14:12 MST 2015
Hi Mc,

short update.

I downloaded the archive from above link and tried to compile LPCUSBLib. Except for 1 problem (__BSS is not defined properly - added this for GCC) compilation works BUT these functions are missing inside the LPCUSBlib which is distributed along the keil devkit:

cdc_main.o:(.rodata.g_usbApi+0x0): undefined reference to `hw_api'
cdc_main.o:(.rodata.g_usbApi+0x4): undefined reference to `core_api'
cdc_main.o:(.rodata.g_usbApi+0x14): undefined reference to `cdc_api'

Then I did a grep on the complete archive but these functions are not inside this archive as well... this is the usb_rom_api stuff which is not bundeled.

Nevertheless, I am still wondering why my code does not run if I use the static library libusbd_177x_8x_lib.a for compiling.

Attached my complete project. All you need to do is to uncompress it into 1 directory. There are 2 makefiles:

make -f Makefile1 tries to compile using the LPCUSBLib which I found in the keil archive you suggested me (which is incomplete)
make -f Makefile2 does complile using the precompiled libusbd_177x_8x_lib.a which is part of lpcopen v2.10 lpcxpresso archive - nevertheless, the usb subsystem does not work as described above - uart works.

As I do not have EMC on my board, all EMC init has been removed out of the code.

cdc_main.c is the main file used for this project

0 Kudos
Reply

766 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by sipiyou on Sat Mar 07 10:56:04 MST 2015
Hi Mc!

Thanks for your reply. I am using the LPC1788FBD144 and I am using the Codered (LPCXpresso) development suite as base, therefore I downloaded this archive for development:

http://www.lpcware.com/system/files/lpcopen_2_10_lpcxpresso_ea_devkit_1788.zip

I was talking about LPCUSBLib. As I just downloaded the keil_iar devkit as you suggested, it seems that the full source for LPCUSBLib is inside that archive - maybe someone forgot to put it into the LPCxpresso-archive. I will check if compiling will help me.

Nevertheless, I am wondering why the CDC-Example is not running. USB is not being recognized - but as written before, I am using USB-Port 0 on my board. Therefore I am not quite sure which modifications are required and if this is a simple configuration problem.



0 Kudos
Reply

766 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sat Mar 07 08:46:26 MST 2015

Hi sipiyou,
Please see response below

Quote:
I can only find the precompiled lib under .../lpc_chip_177x_8x/libs. How can I get the full source for selfcompiling ?



Can you please be clear here. which library? I can see chip and board libs in below packages
http://www.lpcware.com/content/nxpfile/lpcopen-software-development-platform-lpc17xx-packages
lpcopen_2_10_keil_iar_ea_devkit_1788\software\lpc_core\lpc_chip\chip_17xx_40xx


Quote:
Those parts which located under ./lpcusblib_KeyboardHost/ and ./lpcusblib_MassStorageHost/ are not complete.



Could you please explain,what are you looking for?


Quote:
I am trying to get usbd_lib_cdc/ example running. Compile works but USB is not recognized by pc. Just to mention, I got a custom PCB and I am using my old cmsis code - usb works flawlessly therefore I do not see any hardware issues.

At this point I modified the initialization code to usb port 0 but nothing happens. What value is supposed to be used for usb_param.usb_reg_base = LPC_USB_BASE for port 0 ?
The example addes 0x200 to that value but what is the right value for port 0 ?



Could you please let us know which LPC device are you using?  Exact part number please.
0 Kudos
Reply