Disable wakeup from usb for iMX51

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Disable wakeup from usb for iMX51

889 次查看
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


标签 (2)
标记 (2)
0 项奖励
回复
2 回复数

631 次查看
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 项奖励
回复

631 次查看
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 项奖励
回复