dev_suspend_resume_hid_mouse#
Overview#
The Suspend/Resume USB HID mouse application is a simple demonstration program based on the MCUXpresso SDK. It is enumerated as a mouse. Users can see the mouse arrow moving on the PC screen according in a rectangular fashion. When host releases the USB Bus, the device will enter into low power mode. The device can be waked up when resume signal is detected on the bus. Or the device can remote wake-up the host by delivering the resume signal when the remote wake-up is enabled by the host.
System Requirements#
Hardware requirements#
Mini/micro USB cable
USB A to micro AB cable
Hardware (Tower module/base board, and so on) for a specific device
Personal Computer (PC)
Software requirements#
The project files are in:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_suspend_resume_device_hid_mouse/ / .
For lite version, the project files are in:
<MCUXpresso_SDK_Install>/boards//usb_examples/usb_suspend_resume_device_hid_mouse_lite/ / .
The
is Bare Metal or FreeRTOS OS.
Getting Started#
Hardware Settings#
Set the hardware jumpers (Tower system/base module) to default settings.
Prepare the example#
For detailed instructions, see the appropriate board User’s Guide.
Run the example#
Plug-in the device, which is running Suspend/Resume HID mouse example, into the PC. A HID-compliant mouse is enumerated in the Device Manager.
The mouse arrow is moving on PC screen in the rectangular rotation.
Make sure your PC enable the USB remote wake support in BIOS.Press the sleep button to make your PC go to sleep and the USB bus becomes idle. Then the device enters into low power mode.
If the remote wake-up feature is enabled by the host, the device is waked up and delivers the resume signal when the wakeup switch is pressed. The name of wakeup switch is showed in debug console when the remote wake-up feature is enabled. For example, if the name of wakeup switch is “SW3”, the debug console output is as following.
USB device remote wakeup state: 1 USB device start suspend USB device suspended. Please Press wakeup switch(SW3) to remote wakeup the host. Remote wakeup the host. USB device start resume USB device resumed. Press switch(SW3) to run/stop HID mouse drawing square.
Press the same button that can run/stop the HID mouse drawing square, when the USB is active.HID mouse is stopped. HID mouse is running.
Or the device is waked up when the resume signal is detected on the bus.USB device remote wakeup state: 0 USB device start suspend USB device suspended. USB device start resume USB device resumed. Press switch(SW3) to run/stop HID mouse drawing square.
*/
Supported Boards#
LPCXpresso54S018
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
LPCXpresso55S16
Getting Started
Hardware Settings
The Jumper settings:\n JP20 1-2, JP21 1-2 and JP22 1-2 for chip power.
LPCXpresso54S018M
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
FRDM-MCXN947
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.
FRDM-MCXN947T
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.
LPCXpresso54628
Getting Started
Hardware Settings
The Jumper settings:\n J9 1-2 high speed mode,2-3 full speed mode; J10 open high speed, shunt full speed; J11 2-3, J12 2-3, J13 2-3 , need provide external power through J1.
MCX-N5XX-EVK
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.
MIMXRT1180-EVK
Getting Started
Hardware Settings
Since GPIO_BUTTON (SW8) shares the same pin with HP_DET, disconnect the audio jack (J101) when using GPIO_BUTTON (SW8).
MCX-N9XX-EVK
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.
RD-RW612-BGA
Getting Started
Hardware Settings
Please remove the resistor R520 and weld the resistor R518 to make sure the SW4 can work.
FRDM-RW612
Getting Started
Hardware Settings
Only V2 board supports this example.
FRDM-IMXRT700
Getting Started
Hardware Settings
PMIC is the default power supply, you need to make sure PMIC is present before running this case.
Please note that when power supply is changed from PMIC to PMC, in this case if PMIC is set to be disabled mode in deep sleep mode, then to run this case you need to power cycle the board and set the jumpers as default so that PMIC power supply is available.
FRDM-IMXRT1186
Getting Started
Hardware Settings
Since GPIO_BUTTON (SW8) shares the same pin with HP_DET, disconnect the audio jack (J101) when using GPIO_BUTTON (SW8).
FRDM-MCXA577
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.
FRDM-MCXA287
Getting Started
Hardware Settings
Prepare the example
Download the program to the target board.
Power off the target board, due to the target board is bus powered mode.
The power of USBHS PHY only can be provided by the VBUS on the frdm-k66f. Once the device cable was disconnected from a host, the PHY will be powered off. And it needs to be re-initialize again after the device cable is connected. Whether the device is connected or not via the VBUS pin status. But the device can’t detect the VBUS status when the PHY is powered off. So the suspend/resume demo on frdm-k66f can only support the BUS powered mode.
Connect a USB cable between the PC and the USB device port of the board.