5408|6

65

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

WIN CE U盘识别问题 [复制链接]

WIN CE 识别U盘特别不稳定。。。有的时候可以识别。。。有的时候识别不了。。。要重启一下才能识别!!
这是什么问题啊?

最新回复

测试完后好了么?  详情 回复 发表于 2009-11-19 22:08
点赞 关注

回复
举报

72

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
大概你的U盘驱动有问题!
 
 

回复

68

帖子

0

TA的资源

一粒金砂(初级)

板凳
 
你的u盘是什么格式的呢?FAT还是FAT32?只要组件加的没问题,应该不会出现这种情况的?还请楼主说明具体情况?
 
 
 

回复

68

帖子

0

TA的资源

一粒金砂(初级)

4
 
u盘是FAT32的4GB 组件都加上了 感觉要开机等一段时间才能识别到U盘的~ 
 
 
 

回复

87

帖子

0

TA的资源

一粒金砂(初级)

5
 
1. 以前有人讨论过这些问题,你看看和你有没有类似的地方
http://topic.eeworld.net/u/20090916/10/6009396f-54a7-427e-90c0-f2723e58cf4f.html?seed=415955654&r=59851966#r_59851966
2。to:u盘是FAT32的4GB 组件都加上了 感觉要开机等一段时间才能识别到U盘的
u盘比较大而且上面文件比较多的时候,识别时间是需要很久
你可以格式化后重新测试这个时间
3。to:特别不稳定。。。有的时候可以识别。。。有的时候识别不了
这个地方可能就是驱动或者hw的问题了
 
 
 

回复

81

帖子

0

TA的资源

一粒金砂(初级)

6
 
引用 4 楼 guopeixin 的回复:
1. 以前有人讨论过这些问题,你看看和你有没有类似的地方
http://topic.eeworld.net/u/20090916/10/6009396f-54a7-427e-90c0-f2723e58cf4f.html?seed=415955654&r=59851966#r_59851966
2。to:u盘是FAT32的4GB 组件都加上了 感觉要开机等一段时间才能识别到U盘的
u盘比较大而且上面文件比较多的时候,识别时间是需要很久
你可以格式化后重新测试这个时间
3。to:特别不稳定。。。有的时候可以识别。。。有的时候识别不了
这个地方可能就是驱动或者hw的问题了



终于在万能的google上搜索到了答案,以下是EP93xx的bugfix
实验证明对于s3c24xx也是有用的

The file describes the cause and the fix of Windows CE 5.0's USB device
detection problem during power-up.  

1. USB Device Detection Problem during Powering-Up
  - Connect USB devices to EDB93xx's USB ports when the board is
    powered-off.
  - Power on EDB93xx.
  - Wait until CE 5.0 is fully loaded.
  - One or several USB devices are not detected by CE 5.0.


2. The Cause
  In USB's Open Host Controller Interface (OHCI) Specification, in
  Register HcRhDescriptorA (EP93xx address 0x80020048), Bits 24-31
  are PowerOnToPowerGoodTime. This POTPGT byte specifies the duration
  Host Controller Driver has to wait before accessing a powered-on port
  of the Root Hub.  It is implementation-specific.  The unit of time
  is 2 msec. The duration is calculated as POTPGT x 2msec.

  EP93xx's default value of Register HcRhDescriptorA is 0x02001203.
  The value of the POTPGT byte is 0x02. 2*2msec=4msec. It needs 4 msec
  delay after the Host Controller has supplied power to the Root Hub.
  
  The start-up sequence for EDB93xx's USB host controller should be

  1. Host Controller supplies power to the Root Hub.
  2. Delay 4 msec.
  3. Set Host Controller to Operational state. Access USB ports. Start
      to send SOF tokens...etc.

  CE 5.0's USB driver doesn't implement the code to read the HcRhDescriptorA
  register and deploy the required delay.  
  
  
3. The Fix:
  
  Add the 4-msec delay to CE's USB host driver then rebuild the platform.

  Modify the filebr>  WINCE500\PUBLIC\COMMON\OAK\DRIVERS\USB\HCD\OHCD2\chw.cpp
  Please look at the code "//QQQQQ" below.


BOOL CHW::Initialize(void)
{
..................
    InterruptDisable( m_dwSysIntr ); // Just to make sure this is really ours.
    // Initialize Interrupt. When interrupt id # m_sysIntr is triggered,
    // m_hUsbInterruptEvent will be signaled. Last 2 params must be NULL
    if ( !InterruptInitialize( m_dwSysIntr, m_hUsbInterruptEvent, NULL, NULL) )
{
        DEBUGMSG(ZONE_ERROR, (TEXT("-CHW::Initialize. Error on
InterruptInitializern")));
        return FALSE;
    }

    // Apply power to all root hub ports, just like OHCI.
    m_portBase->HcRhDescriptorA.NPS = 1;
    m_portBase->HcRhStatus.reg= HcRegisters::HcRhStatus:PSC;

//QQQQQQQ Add 4msec delay that is required by Host Controller.
Sleep(4);  
   
    // Start up our IST - the parameter passed to the thread
    // is unused for now
    DEBUGCHK( m_hUsbInterruptThread == NULL &&
              m_fUsbInterruptThreadClosing == FALSE );
    m_hUsbInterruptThread = CreateThread( 0, 0, UsbInterruptThreadStub, this, 0,
NULL );
    if ( m_hUsbInterruptThread == NULL ) {
        DEBUGMSG(ZONE_ERROR, (TEXT("-CHW::Initialize. Error creating
ISTn")));
        return FALSE;
    }
    CeSetThreadPriority( m_hUsbInterruptThread, g_IstThreadPriority );
......................
}

应该就是这个了
 
 
 

回复

71

帖子

0

TA的资源

一粒金砂(初级)

7
 
引用 5 楼 tcdl85 的回复:
引用 4 楼 guopeixin 的回复:
1. 以前有人讨论过这些问题,你看看和你有没有类似的地方
http://topic.eeworld.net/u/20090916/10/6009396f-54a7-427e-90c0-f2723e58cf4f.html?seed=415955654&r=59851966#r_59851966
2。to:u盘是FAT32的4GB 组件都加上了 感觉要开机等一段时间才能识别到U盘的
u盘比较大而且上面文件比较多的时候,识别时间是需要很久
你可以格式化后重新测试这个时间
3。to:特别不稳定。。。有的时候可以识别。。。有的时候识别不了
这个地方可能就是驱动或者hw的问题了



终于在万能的google上搜索到了答案,以下是EP93xx的bugfix
实验证明对于s3c24xx也是有用的

The file describes the cause and the fix of Windows CE 5.0's USB device
detection problem during power-up.?

1. USB Device Detection Problem during Powering-Up
? - Connect USB devices to EDB93xx's USB ports when the board is
? ? powered-off.
? - Power on EDB93xx.
? - Wait until CE 5.0 is fully loaded.
? - One or several USB devices are not detected by CE 5.0.


2. The Cause
? In USB's Open Host Controller Interface (OHCI) Specification, in
? Register HcRhDescriptorA (EP93xx address 0x80020048), Bits 24-31
? are PowerOnToPowerGoodTime. This POTPGT byte specifies the duration
? Host Controller Driver has to wait before accessing a powered-on port
? of the Root Hub.? It is implementation-specific.? The unit of time
? is 2 msec. The duration is calculated as POTPGT x 2msec.

? EP93xx's default value of Register HcRhDescriptorA is 0x02001203.
? The value of the POTPGT byte is 0x02. 2*2msec=4msec. It needs 4 msec
? delay after the Host Controller has supplied power to the Root Hub.
?
? The start-up sequence for EDB93xx's USB host controller should be

? 1. Host Controller supplies power to the Root Hub.
? 2. Delay 4 msec.
? 3. Set Host Controller to Operational state. Access USB ports. Start
? ? ? to send SOF tokens...etc.

? CE 5.0's USB driver doesn't implement the code to read the HcRhDescriptorA
? register and deploy the required delay.?
?
?
3. The Fix:
?
? Add the 4-msec delay to CE's USB host driver then rebuild the platform.

? Modify the filebr>? WINCE500\PUBLIC\COMMON\OAK\DRIVERS\USB\HCD\OHCD2\chw.cpp
? Please look at the code "//QQQQQ" below.


BOOL CHW::Initialize(void)
{
..................
? ? InterruptDisable( m_dwSysIntr ); // Just to make sure this is really ours.
? ? // Initialize Interrupt. When interrupt id # m_sysIntr is triggered,
? ? // m_hUsbInterruptEvent will be signaled. Last 2 params must be NULL
? ? if ( !InterruptInitialize( m_dwSysIntr, m_hUsbInterruptEvent, NULL, NULL) )
{
? ? ? ? DEBUGMSG(ZONE_ERROR, (TEXT("-CHW::Initialize. Error on
InterruptInitializern")));
? ? ? ? return FALSE;
? ? }

? ? // Apply power to all root hub ports, just like OHCI.
? ? m_portBase->HcRhDescriptorA.NPS = 1;
? ? m_portBase->HcRhStatus.reg= HcRegisters::HcRhStatus:PSC;

//QQQQQQQ Add 4msec delay that is required by Host Controller.
Sleep(4);?
? ?
? ? // Start up our IST - the parameter passed to the thread
? ? // is unused for now
? ? DEBUGCHK( m_hUsbInterruptThread == NULL &&
? ? ? ? ? ? ? m_fUsbInterruptThreadClosing == FALSE );
? ? m_hUsbInterruptThread = CreateThread( 0, 0, UsbInterruptThreadStub, this, 0,
NULL );
? ? if ( m_hUsbInterruptThread == NULL ) {
? ? ? ? DEBUGMSG(ZONE_ERROR, (TEXT("-CHW::Initialize. Error creating
ISTn")));
? ? ? ? return FALSE;
? ? }
? ? CeSetThreadPriority( m_hUsbInterruptThread, g_IstThreadPriority );
......................
}

应该就是这个了

测试完后好了么?
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/9 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表