LpcOpen v2.10 USBD based example projects not working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LpcOpen v2.10 USBD based example projects not working

1,926 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.t.karlsson@gmail.com on Thu Mar 20 06:40:18 MST 2014
HI

Im testing the usbd_lib_cdc project in latest LpcOpen v2.10 release on LpcXpresso LPC1769 but I cannot get it work.

I can compile and start debug with no problem, but when connecting the board to USB port on computer(win 7), the device is not enumerated.
The device does not appear at all in device manager, so it is like it's not seen on the USB bus.

I can see that the USB interrupt handler function (USB_IRQHandler(void) in cdc_main.c) is called when the USB contact is plugged or unplugged, but not otherwise.

I have tested a few non usbd projects and for these I have  no issue. Like periph_systik works fine, but I cannot get any of the usbd projects to work.

I have a LpcXpresso LPC1769 EA board connected to a custom extension board. This have worked fine with RDB1768cmsis2_usbstack based projects in the past.
I also used the latest tool chain, LPCXpresso  7.0.2

Any thoughts on what can be wrong?

Best regards
Daniel
标签 (1)
0 项奖励
回复
6 回复数

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by terrype on Wed Oct 15 17:27:21 MST 2014
Hi Capstone,  Did you try the USB host MSC on that board? It is working fine for singel usb key but when i replace with new key that key is not enumerating
0 项奖励
回复

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by capstone on Tue Jun 24 06:40:59 MST 2014
Daniel - Thanks for the courtesy of your response!

I have a solution for the failed connection, where the pc does not even start the enumeration. The fix involves one line added to the xpresso lpc1769 board.c. Additionally, if you get a failed enumeration (pc can't find the correct inf file) I have provided a link to the needed file.

This link provides the details. This usbd library has only been tested with the simple echo code at this time.

http://www.lpcware.com/content/forum/usbdlibcdc-lpcxpresso-1769-0

I also have ported the board library and several of the sample programs to the Code Red RDB1768-Rev2 board, including the complete LCD functionality. Just now getting ready to test the enet as the last piece. Let me know if you need this.
0 项奖励
回复

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.t.karlsson@gmail.com on Tue Jun 24 02:17:45 MST 2014
Hi

NO I gave up on using the USBD version

Instead I transformed the "lpcusblib_KeyboardHost" example(in lpcopen 2.10), from host to device. You will have to copy some code from lpcopen v1.03 for the device part and change compiler symbols USB_HOST_ONLY -> USB_DEVICE_ONLY, maybe something more.

Then you can use lpcopen 2.10 and not the bloated code in lpcopen 1.03.

Good luck!
Daniel
0 项奖励
回复

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by capstone on Sun Jun 22 17:07:39 MST 2014
Daniel,

I have this same issue. Did you ever find an answer and resolution?

During the initialization I seem to get LPC_OK from the USBD_API->cdc->init (line 130 cdc_vcom.c) but fail later at line 178 fails testing for connected status. Seems within the library, so some setup incorrect. In any case a bit above my ability.

Thanks for any info!
0 项奖励
回复

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by daniel.t.karlsson@gmail.com on Fri Mar 21 00:51:08 MST 2014
Last in the post  is the content of  the readme for the vcom(usbd_lib_cdc) example.

I don’t have an Mbed board(or EA devkit 1788) and it seem you cannot access the schematic without buying one to understand what effect shorting pin 2 and 3 will have on Lpcxpresso board.

But from what I can understand the only USB signals related to this issue is D+, D-, GND is the VBUS signal.
Vbus monitors presence of VBUS power(from host)
From the user manual UM10360 you can find

"This need to be pulled high for USB reset to occur" (p.101 UM10360)
But later in the pin description section it is stated that:
"VBUSstatus input. When this function is not enabled via its corresponding PINSEL register, it is driven HIGH internally." (p219 UM10360)

I have looked at the code and in the initializing function Board_USBD_Init (lpc_board_nxp_lpcxpresso_1769\src\board.c) that is called in usbd_lib_cdc example
You can find this comment.
/* VBUS is not connected on the NXP LPCXpresso LPC1769, so leave the pin at default setting. */
/* Chip_IOCON_PinMux(LPC_IOCON, 1, 30, IOCON_MODE_INACT, IOCON_FUNC2); */  

So it should be correct configured to internally pull VBUS high

I have also tested uncomment the  line so p1.30 is VBUS sense and on Lpcxpresso board connect the VBUS signal to VBUS(Host) but with no effect.

I have the Free Edition license with 256KB download limit. Could that be the problem that it doesn't allow downloading to the ROM area?
I get no warnings or errors and the flash log look ok to me.
"""
Nc: Looked for vendor directory XML file in C:/nxp/LPCXpresso_7.0.2_102/lpcxpresso/bin/nxp_directory.xml

Nc: Found generic directory XML file in C:/nxp/LPCXpresso_7.0.2_102/lpcxpresso/bin/crt_directory.xml

Pc: (  5) Remote configuration complete
Pc: ( 30) Emulator Connected
Xw:
Xc:
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: Emu(0): Conn&Reset. DpID: 2BA01477. Info: HID64HS12
Nc: SWD Frequency: 250 KHz. RTCK: False. Vector catch: False.
Nc: Packet delay: 0  Poll delay: 0.
Nc: Loaded LPC175x_6x_512.cfx: LPC175x_6x (512K) Apr 22 2013 12:14:31  On-chip Flash Memory

Nc: NXP: LPC1769  Part ID: 0x00000000
Pc: ( 65) Chip Setup Complete
Nt: Connected: was_reset=true. was_stopped=false
Cr:v LPCXpresso Free License - Download limit is 256K
Pc: ( 70) License Check Complete
Nt: Loading ELF file 'usbd_lib_cdc.axf' at location 00000000
Nt: Writing 12484 bytes to 0000 in Flash (assumed clock: 4.0MHz)
Pb: 1 of 1 (  0) Writing pages 0-3 at 0x00000000 with 12484 bytes
Ps: (  0) Page  0 at 00000000
Ps: (  0) Page  0 at 00000000: 4096 bytes
Ps: ( 32) Page  1 at 00001000: 4096 bytes
Ps: ( 65) Page  2 at 00002000: 4096 bytes
Ps: ( 98) Page  3 at 00003000: 196 bytes
Nt: Erased/Wrote page  0-3 with 12484 bytes in 2427msec
Pb: (100) Finished writing Flash successfully.
Nt: Flash write Done
Nc: nSRST assert (if available)
Nc: Executing in user flash.
"""


Content of readme.txt:
"""
Virtual Comm port example

Example description
The example shows how to us USBD LIB stack to creates a virtual comm port.

Special connection requirements
Connect the USB cable between micro connector on board and to a host.
When connected to Windows host use the .inf included in the project
directory to install the driver. For OSx (Mac) host, no drivers are needed.

Note that on the LPCXpresso LPC1769 board connected to an LPCXpresso/mbed
Base Board J14 needs to be moved to short pins 2 and 3.

On EA Devkit 1788/4088 board jumper J15 must be closed, for the device
to be detected.

Build procedures:
Visit the LPCOpen quickstart guides at link "http://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers/lpcopen-v200-quicks..."
to get started building LPCOpen projects.
"""
0 项奖励
回复

1,755 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Thu Mar 20 13:42:47 MST 2014
LPC1769 and LPC1788/4088 examples for USBDROM might have special board setup requirements. Do the readme.txt files included with those projects detail any specific steps need to get those USBD examples working? (Jumpers, external power, etc.)?
0 项奖励
回复