yangjuyi
驱动牛犊
驱动牛犊
  • 注册日期2005-01-27
  • 最后登录2005-05-16
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:917回复:0

这个贴子发了总是每人理阿,帮帮忙吧!!

楼主#
更多 发布于:2005-05-16 19:13
我使用isp1581作为接口芯片,我的两个usb设备在1.1下有时能枚举成功,有时不能,不能的时候就是三次busreset!而两个usb设备在2.0下都能枚举成功。很奇怪。
这是我的寄存器初始化:
outport(rega_mode,0x08);
outport(rega_intcfg,0x55);
outport(rega_intmask_low,0xffa0);
outport(rega_intmask_high,0x3ff);
outport(rega_interrupt_low,0);
outport(rega_interrupt_high,0xfc00);
outport(rega_addren,0x80);
outport(rega_mode,0x09);

这是我的中断服务程序:
int_low = ISP1581_ReadInterruptRegisterLow();
int_high = ISP1581_ReadInterruptRegisterHigh();

if(int_low != 0 || int_high != 0)
{
if(int_low & int_busreset)
{
intflag_busreset=1;
ISP1581_IntClearl(int_busreset);
outport(rega_intcfg,0x55);
outport(rega_intmask_low,0xffa1);
outport(rega_intmask_high,0x3ff);
outport(rega_interrupt_low,0);
outport(rega_interrupt_high,0xfc00);
outport(rega_addren,0x80);
ISP1581_ConfigEndpoint();

}

if(int_low & int_hs_stat)
{
intflag_hstat=1;
ISP1581_IntClearl(int_hs_stat);
bISP1581flags.bits.ConnectSpeed = HighSpeed;
}
......
请帮忙看有什么问题么,我调试了很多天,没什么进展,能给点调试建议么?请版主也帮忙看看吧,谢谢!
游客

返回顶部