Remotely Power Cycle a USB 3.1 Camera

Last Revision Date: 7/16/2015

This article describes how to remotely reset, or power cycle, your USB3 camera. 

Under certain conditions, the user may want to remotely reset the camera. Disabling and enabling the supply of power to the camera, or power cycling, can be implemented to return the camera to a known operating condition. To achieve this with USB3 cameras, the user needs to remove power from both external GPIO and USB3 interface bus power (VBUS). The camera cannot be power cycled while it is also powered by the GPIO pins. The GPIO power must be disconnected first to ensure the camera is only powered by the USB3 bus.

Some USB3 host controllers support toggling of VBUS using a software command. This allows the user to power cycle a USB3 camera remotely.

To toggle the power bit:

    1. Identify a supported USB3 host controller (such as ACC-01-1201).
    2. Identify the Memory-Mapped I/O (MMIO) base address of the host controller.
    3. Identify the internal USB 3.1 port address of the camera connection.
    4. Identify the internal USB 2.0 port address of the camera connection.
    5. Disable port power.
    6. Toggle port power.

The UsbHostControlUtility can be used to identify supported host controllers, and modify the MMIO base addresses. Contact Support at https://flir.custhelp.com/app/ask to obtain this utility.

This example uses the following configurations:

Host Controller: ACC-01-1201 (Driver version: 3.0.23.0)
Camera: BFLY-U3-12S2 (Driver version: 2.7.3.62)

USB3 host controller port power support

To find out if a host controller supports port power control, run the UsbHostControlUtility with the following command line:

UsbHostControlUtility.exe /th


The utility will list every USB3 host controller enabled on the system and identify whether port power control is supported. A list of known supported/unsupported host controllers is provided below:

Host Controller Port Power Control Part Number
Renesas µPD720202 Supported   ACC-01-1201
Fresco FL1100   Unsupported ACC-01-1202, U3-PCIE2-2P01X
ASMedia ASM1142   Unsupported  
Intel 9 Series   Unsupported  

 

Identifying the MMIO base address

To find the MMIO base address of the USB3 host controller, run the UsbHostControlUtility with the following command line:

UsbHostControlUtility.exe /th

The MMIO base address of the Renesas controller is shown as 0xDF900000.

 

Identifying the USB3 port address

With only the USB3 camera connected to the host controller, query the host controller’s MMIO base address to report a list of ports on the host controller by running this command:

UsbHostControlUtility.exe /portsc 0xDF900000

The address with values different from all the other ports is the port with the camera connected.

 

Identifying the USB 2.0 port address

The host controller card has two physical ports, but is represented by four ports in the PORTSC listing. This is because each physical port is represented by a USB3 port and a USB2 port in the PORTSC listing. To identify the address of the USB 2.0 port, turn off the power on the USB3 port to force the camera into a USB 2.0 state. This can be accomplished by reading the data values from the USB3 port address, changing bit[9] (Port Power bit) to 0 and writing the new data values back to the address.

Run the command:

UsbHostControlUtility.exe /w 0xDF900430 0x1043




Note: Use FlyCapture2 to verify that the camera is identified as a USB 2.0 device. If this camera does not show up in FlyCapture2, the camera driver may need to be installed. Disconnect and reconnect the camera cable to trigger the driver installation.

 

Disabling port power

To disable bus power to the camera, change the power bit (bit[9]) to 0 on both the USB3 and USB2 ports. This can be accomplished by reading the data values from the each port addresses, changing bit[9] (Port Power bit) to 0 and writing the new data values back to the address.

Run this command:

UsbHostControlUtility.exe /w 0xDF900450 0xa0

 At this point, the USB bus is no longer providing power to the camera and the camera’s LED power indicator light is off.

Toggling port power

Using the MMIO base address, the USB3 port address, and USB2 port address, the port power can be toggled following the sequence below:

To turn the power off:

    1. UsbHostControlUtility.exe /w [USB2_Port_Address] [Set bit[9] to 0]
    2. UsbHostControlUtility.exe /w [USB3_Port_Address] [Set bit[9] to 0]

To turn the power on:

    1. UsbHostControlUtility.exe /w [USB3_Port_Address] [Set bit[9] to 1]
    2. UsbHostControlUtility.exe /w [USB2_Port_Address] [Set bit[9] to 1]

This restores the host controller to its original state and completes the power recycling of the camera.

Troubleshooting

If the above steps fail to reset the camera, the user must reset the camera and host controller manually.

    • To manually reset the camera, disconnect and reconnect the USB3 cable on the host side or the camera side.
    • To manually reset the host controller, use the Windows Device Manager.