自己做了个USB的板子 用的是68001和dsp 附件中有原理图 固件 上位机代码 但不知道为什么EP6中的数据传不到HOST中(EP8也是) 不知是什么错误 我看了68001的datesheet中的0x20寄存器 文档上写的如下:7.10 INPKTEND/FLUSH Register 0x20
This register allows the external master to duplicate the function of the PKTEND pin. The register also allows the external master
to selectively flush endpoint FIFO buffers..
Bit [4..7]: These bits allows the external master to selectively flush any or all of the endpoint FIFOs. By writing the desired endpoint
FIFO bit, SX2 logic flushes the selected FIFO. For example setting bit 7 flushes endpoint 8 FIFO.
Bit [3..0]: These bits are is used only for IN transfers. By writing the desired endpoint number (2,4,6 or 8), SX2 logic automatically
commits an IN buffer to the USB host. For example, for committing a packet through endpoint 6, set the lower nibble to 6: set bits
1 and 2 high
但是像我的程序中写的一样 先向EP6中写数据后在向0x20寄存器写6 还是 反过来先写06再写EP6中的数据呢?还是我的上位机软甲有问题呢? 谢了 |