USB DRIVER interface with LPC 54018 MICRO CONTROLLER

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

USB DRIVER interface with LPC 54018 MICRO CONTROLLER

Jump to solution
2,176 Views
Arularasan
Contributor II

Using USB communication How to interface usb driver with lpc 54018 controller ?

Please send the following steps ....

0 Kudos
Reply
1 Solution
1,925 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Arularasan 

I tested host_msd_fatfs for both USB0 and USB1. They both work well. 

Please check the jumper setting.

For USB0 (USB FS), board jumper settings are as below

J9 2-3 full speed mode; J10  shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.

ZhangJennie_0-1678175744172.png

For USB1 (USB HS), board jumper settings are as below

J9 1-2 high speed mode; J10 open high speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.

ZhangJennie_1-1678175911537.png

As the default code is for FS USB. To work with HS USB, revise source\usb_host_config.h macro as below :

#define USB_HOST_CONFIG_OHCI (0U)
#define USB_HOST_CONFIG_IP3516HS (1U)

 

Jun Zhang

 

 

View solution in original post

0 Kudos
Reply
11 Replies
2,126 Views
Arularasan
Contributor II

 

@ZhangJennie  thanks for your reply.

i am using USB1

there is no read and write function in  mcuxpresso demo code .only initialization functions are there.

kindly help me to read and write in pendrive through usb communication in lpc54018.

 

 

have a nice day.

0 Kudos
Reply
2,154 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi @Arularasan 

Do you use USB1 or USB0?

There are some USB demo codes under MCUXpresso SDK folder. By default, the demo code is for USB0 (FS USB). If you use USB1, please follow below article to switch to USB1 code:

https://community.nxp.com/t5/LPC-Microcontrollers-Knowledge/LPC-ALL-Summary-of-Switching-USB-demo-fr...

 

For HW design, I suggest you refer EVK schematic:

https://www.nxp.com/downloads/en/schematics/LPCXpresso546xx-540xx.zip

 

Have a nice day,

Jun Zhang

0 Kudos
Reply
2,129 Views
Arularasan
Contributor II

 

Screenshot (9).png

 

0 Kudos
Reply
2,043 Views
Arularasan
Contributor II

@ZhangJennie    thanks for your reply.

USB HOST demo under SDK example code ("host_msd_fatfs_bm") I have download  but its not working !

I want to read and write in pen drive through USB communication iam using USB1. 

kindly help me @ZhangJennie 

0 Kudos
Reply
2,026 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi 

Please follow attched files to test the demo.

How it works if you plug in  a U-disk device to the board? If problem, which step you have problem?

Thanks,

Jun Zhang

0 Kudos
Reply
2,015 Views
Arularasan
Contributor II

@ZhangJennie 

in debug mode 

it prints only " host init done "

when I plug in u disk in USB1 nothing is printed in terminal.

please reply @ZhangJennie 

0 Kudos
Reply
2,003 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I tested host_msd_fatfs_bm demo with LPC55s69 demo board, it ran well.

While on LPC54018 board, I got the same as yours. I am checking the reason. Will let you know as soon as I find it out.

Thanks,

Jun Zhang

0 Kudos
Reply
1,995 Views
Arularasan
Contributor II

@ZhangJennie iam waiting for your reply..

thank you.

0 Kudos
Reply
1,926 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

HI Arularasan 

I tested host_msd_fatfs for both USB0 and USB1. They both work well. 

Please check the jumper setting.

For USB0 (USB FS), board jumper settings are as below

J9 2-3 full speed mode; J10  shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.

ZhangJennie_0-1678175744172.png

For USB1 (USB HS), board jumper settings are as below

J9 1-2 high speed mode; J10 open high speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.

ZhangJennie_1-1678175911537.png

As the default code is for FS USB. To work with HS USB, revise source\usb_host_config.h macro as below :

#define USB_HOST_CONFIG_OHCI (0U)
#define USB_HOST_CONFIG_IP3516HS (1U)

 

Jun Zhang

 

 

0 Kudos
Reply
1,904 Views
Arularasan
Contributor II

@ZhangJennie thanks for your support.

After modify demo code  macro definition in usb_host_config.h and jumpers to USB1 its working

thank you...

 

0 Kudos
Reply
1,902 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome.