LPC4088 with two USB mass storage devices

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

LPC4088 with two USB mass storage devices

1,432 Views
jeroenjacobs
Contributor II

Hello,

The LPC4088FET208 has two usb connections. I want to use both as hosts for usb mass storage devices, so i can plug usb-sticks and keyboard/mouse.

My first question: is it possible to use both usb connections at the same time?

My second question: how should i configure the registers to accomplish this?

I am also looking for a recent version of the libusb since LPCware.com is down. or are there better alternatives to use?

Labels (3)
6 Replies

875 Views
Dezheng_Tang
NXP Employee
NXP Employee

I used to get both host ports work long time ago on Embedded Artists board for LPC177x_8x. It should work the same way for LPC407x_8x chip, maybe some change in IOCON. Although there is only one USB interrupt, there are two RH port status registers you can use to distinguish the two. 

Attached here the source as references. Hopefully, it helps.

0 Kudos

875 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jeroen,


The LPC4088 can’t drive two USB host ports at the same time, the MCU has only one USB host controller but can use any of the 2 USB ports for its operation.

About the software, I would recommend you to use the LPCOpen examples for the LPC4088 devices:

LPCOpen Software for LPC40XX|NXP 


Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

875 Views
jeroenjacobs
Contributor II

Thanks for the answer Carlos!

I guess with the Port Selection Register, it is possible to switch between the two usb ports:

https://www.nxp.com/docs/en/user-guide/UM10562.pdf page 332.

Which means only one can act as host.

But the LPC4088 also supports USB OTG, so with one port configured as usb OTG (storage device), and another usb port as host device (i.e. for a keyboard) should be possible?

https://www.nxp.com/docs/en/data-sheet/LPC408X_7X.pdf  page 112.

So now another question arises: what is the real difference between a usb host and usb OTG connection?

Currently I got one USB port configured as host and i can connect a usb mass storage device.

0 Kudos

875 Views
jeroenjacobs
Contributor II

Sorry for the double post.

Carlos_Mendoza‌ I think it should be possible to use two usb hosts

https://www.nxp.com/docs/en/user-guide/UM10562.pdf  page 398 shows a diagram with two USB hosts.

13.4.1.1 USB host usage note Both ports can be configured as USB hosts. For details on how to connect the USB ports, see the USB OTG chapter, Section 14.7.

Can you confirm it is possible to use two usb ports as host?

0 Kudos

875 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Jeroen,


Apologies, you are correct. You can use the USB OTG controller and configure both ports U1and U2 for host operation.

Best Regards,
Carlos Mendoza
Technical Support Engineer

875 Views
jeroenjacobs
Contributor II

OK thanks for the confirmation. I already thought it should be possible, but during tests I never got the second USB port to respond or throw interrupts. Yesterday I found out that the OHCI (Open Host Controller Interface) only supports USB port one. The registers to trigger interrupts for the second usb port aren't used. This brings me to the next question: Is there a driver/ software available that supports both USB ports? (Or just the second USB channel) Or should it be possible with the LpcOpen and LpcUSB libraries?

0 Kudos