LPC55S66 USB device

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

LPC55S66 USB device

Jump to solution
1,838 Views
mditto1
Contributor III

I'm trying to get our custom LPC55S66 board running as a USB high speed device.

I can build the LPCExpresso EVK examples, such as dev_cdc_vcom_lite_bm, and run them on the EVK board.  But I have not figured out how to run examples on our board.  Just changing MCU from '69 to '66 results in a project that won't compile as I mentioned in Help getting started .  And I've made many attempts to copy the code from the example project into a trivial project that builds and runs on our board, but it has too many compile errors.  It looks like the example code is designed for a different version of the USB drivers - functions have slightly different names or are just missing, etc.

How does one get started using USB?

I have enabled USB common and USB device in the Middleware SDK components.  Where are the APIs for these components documented?

Thanks,

Mike

Labels (2)
1 Solution
1,707 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Mike,

We normally suggest customer porting code to a usb sdk demo code because demo is more complex.

If you want to import SDK USB source file to a project, you can do it with SDK components management window

pastedImage_1.png

Hope this helps.

Jun Zhang

View solution in original post

0 Kudos
3 Replies
1,707 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Mike,

You use LPC55S66, I suggest you download SDK for LPC55S66 directly from

https://mcuxpresso.nxp.com/en/select 

By default, USB demo code uses full speed USB0, if you want to use USB1, On SDK side, you need enable high speed mode with below code:

/*! @brief LPC USB IP3511 FS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511FS (0U)

/*! @brief LPC USB IP3511 HS instance count */
#define USB_DEVICE_CONFIG_LPCIP3511HS (1U)

 

please test your modified SDK code with a demo board. If your code can work well on demo board, you need check your hardware design. USB1 is High speed USB, from the feedback of my customer, It is sensitive. so I suggest you refer our demo board USB1 design schematic.

For example, PRTR5V0U2X is recommended as additional ESD protection.

Best Regards

Jun Zhang

0 Kudos
1,707 Views
mditto1
Contributor III

Hi, Jun,

With the advice from you and from Alexis in Help getting started I was able to modify the the dev_cdc_vcom_lite_bm example for high speed and run it on our board.  This really helps us start testing our board design, thanks!

So my main question right now is how to add USB code to an existing project.  I have created a simple project without any USB code that works on our board.  My attempts to copy code from the examples such as dev_cdc_vcom_lite_bm into my project have not succeeded - they are all compilation/build problems, not runtime problems.

I am not sure how this is supposed to work - should I copy files from the "source" directory in the example project and assume that the IDE will populate the necessary driver sources in the "usb" and "sources/generated" directories?

0 Kudos
1,708 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Mike,

We normally suggest customer porting code to a usb sdk demo code because demo is more complex.

If you want to import SDK USB source file to a project, you can do it with SDK components management window

pastedImage_1.png

Hope this helps.

Jun Zhang

0 Kudos