Disable wakeup from usb for iMX51

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

Disable wakeup from usb for iMX51

821 Views
SteM
Contributor III

Hi all,

WinCE600R3 + iMX51.

When the device suspends, it power off the 5v0 and 3v3 voltages: this cause wakeup events for usbh1 and usbotg that resume the device.

How can i disable wakeup from usbh1 and otg to avoid this?

Where in the code i put this? BSPPowerOff() function ?

Thanks


Labels (2)
Tags (2)
0 Kudos
2 Replies

563 Views
SteM
Contributor III

Just before the power off of the voltages i put:

//SM disable USBH1   

dwSysIntr = 0x1d;

OEMIoControl(IOCTL_HAL_DISABLE_WAKE, &dwSysIntr, sizeof(dwSysIntr), NULL, 0, NULL);

//SM disable USBOTG   

dwSysIntr = 0x1f;

OEMIoControl(IOCTL_HAL_DISABLE_WAKE, &dwSysIntr, sizeof(dwSysIntr), NULL, 0, NULL);

0 Kudos

563 Views
GlenWienecke
NXP Employee
NXP Employee

The proper way to disable the USB as a wake source is to use some CDEFINES definitions that allow compile-time configuration of the USB wakeup capabilities.  In the respective SOURCES files of the USBH and USBOTG drivers, you will find the following CDEFINES definition:

CDEFINES=$(CDEFINES) -DCEDDK_USEDDKMACRO -DUSB_WAKEUP_CNANDDN

#-DUSB_WAKEUP_CN

#-DUSB_WAKEUP_NONE

Use the USB_WAKEUP_NONE (commented out by default) if you want to remove the registration of the USB as a wake source.  Search for these CDEFINES in the source code of the USB driver to see how the configuration will differ.  Be sure to rebuild the respective USB drivers after changing the CEDEFINES as the SOURCES files are not considered as build dependencies.

0 Kudos