ERROR: Power Handler function yield to low priority thread. 解决方法
来源:互联网 发布:淘宝店铺导航在线制作 编辑:程序博客网 时间:2024/05/16 12:28
最近在调试休眠唤醒,发现添加了 USBFN 驱动后,
休眠唤醒后出现
ERROR: Power Handler function yield to low priority thread. 错误。
通过网上查找一些资料,基本确定是在 POWERUP POWERDOWN 的时候调用了
系统的 API ,如 SLEEP 之类的。
查看 USBFN 的驱动,在
BOOL HW_USBClocks(CEDEVICE_POWER_STATE cpsNew)
{
DWORD loop;
if (cpsNew == D0) //power on
{
USBFN_MSG( (TEXT("HW_USBClocks::D0 \r\n")));
//if(pIOPregs->GPFDAT & (1<<2)) //check cable connection, for powerconsumption
{
// Set the Normal mode
// pIOPregs->GPHCON = (pIOPregs->GPHCON & ~(0x3<<28)) | (0x1<<28);
// pIOPregs->GPHUDP = (pIOPregs->GPHUDP & ~(0x3<<28));
// pIOPregs->GPHDAT = (pIOPregs->GPHDAT & ~(0x1<<14)) | (0x1<<14);
pIOPregs->MISCCR &= ~(1<<12);
// Enable the PHY Power
pCLKPWR->PWRCFG |= (1<<4);
// First USB PHY has to be reset, and after 10us, func and host has to be reset.
pCLKPWR->USB_CLKCON = (0<<31)|(1<<2)|(0<<1)|(0<<0); //pullup disable
pCLKPWR->USB_RSTCON = (0<<2)|(0<<1)|(1<<0);
for(loop=0;loop<180000;loop++);
for(loop=0;loop<180000;loop++);
//Sleep(2);
pCLKPWR->USB_RSTCON = (1<<2)|(0<<1)|(0<<0);
//Sleep(2);
for(loop=0;loop<180000;loop++);
for(loop=0;loop<180000;loop++);
pCLKPWR->USB_RSTCON = (0<<2)|(0<<1)|(0<<0);
pCLKPWR->USB_CLKCON = (1<<31)|(1<<2)|(0<<1)|(0<<0);//pull up enable
这里有两个 SLEEP 函数。
把 SLEEP 换成 软件延时,这样问题解决了。
希望对后来人有所帮助~!@
- ERROR: Power Handler function yield to low priority thread. 解决方法
- ERROR: Power Handler function yield to low priority thread 解决办法
- ERROR: Power Handler function yield to low priority thread 解决办法(作者:JNU_kinke)
- windows mobile 6.5.3 ERROR: Power Handler function yield to low priority thread.
- How to schedule the thread's priority?
- priority -- join -- yield
- Fatal error: Call to undefined function curl_init()错误解决方法
- Fatal Error: Call To Undefined Function Mysql_pconnect()。。。。。。的解决方法
- Fatal error: Call to undefined function session_register() 的解决方法
- Fatal error: Call to undefined function: mysql_connect()解决方法
- Fatal error: Call to undefined function session_register() 的解决方法
- Fatal error: Call to undefined function mysqli_connect() 的解决方法
- Fatal error: Call to a member function..的解决方法
- Fatal error: Call to a member function..的解决方法
- 出现"VMProcessPageFault Error: Page fault occurred while in power handler"原因及解决方法
- Thread.yield( )
- Thread yield
- Thread.yield()
- internet Speech Audio Codec(iSAC)
- CSDN博文精选:Android系列开发博客资源汇总
- 《算法导论》第19章二项堆的实现源代码
- ExecutorService线程池
- poj 2407(欧拉函数)
- ERROR: Power Handler function yield to low priority thread. 解决方法
- 三大排序算法...bubble,quick,shell(冒泡算法,快速排序算法,希尔算法)
- 动态链接库全面浅析(一)-----Win32 动态链接库
- 工作流的基本概念
- 笔记本LCD与LED的区别
- js parseFloat 浮点数求和 精确位数
- 子衿的事(46)
- oracle的索引使用注意
- CSS选择器