USB DRIVER interface with LPC 54018 MICRO CONTROLLER

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

USB DRIVER interface with LPC 54018 MICRO CONTROLLER

跳至解决方案
5,498 次查看
Arularasan
Contributor II

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

Please send the following steps ....

0 项奖励
回复
1 解答
5,247 次查看
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 项奖励
回复
11 回复数
5,448 次查看
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 项奖励
回复
5,476 次查看
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 项奖励
回复
5,451 次查看
Arularasan
Contributor II

 

Screenshot (9).png

 

0 项奖励
回复
5,365 次查看
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 项奖励
回复
5,344 次查看
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 项奖励
回复
5,333 次查看
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 项奖励
回复
5,321 次查看
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 项奖励
回复
5,313 次查看
Arularasan
Contributor II

@ZhangJennie iam waiting for your reply..

thank you.

0 项奖励
回复
5,248 次查看
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 项奖励
回复
5,222 次查看
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 项奖励
回复
5,220 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

You are welcome.