Content originally posted in LPCWare by DT1 on Fri Apr 25 07:44:37 MST 2014 Hi,
I'm using the NXP LPC43xx USB stack. I'm implementing a DEV-MSC. I need to know if I have an active connection or not to restrict/allow specific parts of the application. So far in my research I haven't found a clean way to do it. I was thinking on checking the SUSP bit because the behavior I observed was in line with what I wanted to do, but I'm getting strange results, probably due to setup time. Here is what I'm doing:
Content originally posted in LPCWare by embd02161991 on Tue Apr 29 17:55:59 MST 2014 Hi, When the device is connected to a host , a USB reset is received. The URI bit is set in the USB status register(USBSTS). If the USB reset enable(URE) bit in USB interrupt register(USBINTR) is one and the USB Reset Received bit in the USBSTS register is a one , the device controller will issue an interrupt. This interrupt is acknowledged by software clearing the USB Reset Received bit.
The USB Reset Received Bit and the interrupt can be used to determine if an active connection is established.