就是用EP2作为bulk ,auto-in quad buffer, auto in length = 512,测试时发现当接收满所有数据后,此时EP2CS = 0x30, {EP2FIFOBCH,EP2FIFOBCL} = 0x1FE,EP2FIFO标志寄存器S = 0x1;此时我想复位清空buffer,代码如下:
FIFORESET = 0x80;
SYNCDELAY;
FIFORESET = 0x2;
SYNCDELAY;
FIFORESET = 0x0;
结果却是EP2FIFO标志寄存器S = 1, {EP2FIFOBCH,EP2FIFOBCL} = 0x1FE, EP2CS = 0x4,表明状态仍然为满,无法再写入新的数据 |