阅读:1628回复:2
CY7C63813在枚举时遇到问题。
现在在枚举的时候,setaddress地址正确设置了,但每次就是到这里就停下来。什么原因大家有没有遇到过,我用的CY63813.
USBCR=0x80|ENDPOINT_A0_FIFO[USB_wValue]; SET_EP0_MODE(USB_MODE_STATUS_ONLY);//send zero byte data |
|
沙发#
发布于:2008-03-10 18:41
在EZ-USB Technical Reference Manual的78页有这么一段话,指出68013的地址设置是通过硬件自动完成的,Firmware不参与,并且保存地址的寄存器FNADDR是只读的。该段话如下:
When a USB device is first plugged in, it responds to device address 0 until the host assigns it a unique address using the Set Address request. The EZ-USB copies this device address into the FNADDR (Function Address) register, then subsequently responds only to requests to this address. This address is in effect until the USB device is unplugged, the host issues a USB Reset, or the host powers down. The FNADDR register is read-only. Whenever the EZ-USB ReNumerates? (see Chapter 3, "Enumeration and ReNumeration?"), it automatically resets FNADDR to zero, allowing the device to come back as new. An EZ-USB program does not need to know the device address, because the EZ-USB automatically responds only to the host-assigned FNADDR value. The device address is readable only for debug/diagnostic purposes. 所以,我很纳闷,你的Firmware则么有设置地址的语句? |
|
板凳#
发布于:2008-03-20 11:18
这不是68013是63813,现在又出来一个问题,再开发环境的机子枚举没有问题,到别的计算机不认设备,这个问题困扰我很久了,是不是USB引擎速度太慢,读写都需要一定的延时,解决类似问题的大侠能否共享经验?
我是参考那个63723鼠标开发例子做的,用C编写的。 |
|