My customer is using the LPC1800 for a USB application. Now they want to use the VBUS Pin of the USB1 Interface to discover Connect/Disconnect conditions. How is this done?
Could you explain more of this application?
Is LPC1800 used as a USB host or device?
It's the device's responsibility to actively connect to the host, and host may need to provide power to the device via VBUS pin.
the LPC1800 USB1 Interface is used as USB-Device.
The customer wants to discover the case that the USB gets disconneted from the host (i.e. the USB-Cable gets unplugged)
In this case the VBUS Signal on the pin gets LOW (because of the external Pull-Down). But the customer doesn't know, which bit in any of the internal Registers to read to discover this case.
Below descriptions may give you some hint.
the message also says “REMARK: The setting of this bit has no effect if the USB1_VBUS function of P2_5 is enabled through the SFSP2_5 register.“
The customer did enable the USB1_VBUS Signal through SFSP2_5. Otherwise he would not get the external signal into the device.
Still, the question is: How can he read the status of the external VBUS Signal in the device.
My understanding of the remark is that writing/setting has no effect, not necessarily means reading.
Because VBUS is an input signal, not like general I/O.
May be you can test and verify it with a board.
Hi Peter,P2_5 is an input to the USB1 full speed transceiver which works as a VBUS power detector. This sensing input is then automatically controlling the internal vbus_valid signal.
In case you don't use this transceiver input at pin P2_5, you could use any other GPIO or an ADC input to sense the VBUS signal level. By means of polling or with a level triggered interrupt you can then write by software into the bit USB_VBUS and control the internal signal vbus_valid by software.
Thanks for your detailed clarification.
Retrieving data ...