我想通过SlaveFIFO模式把主机数据通过EZ-USB传输给外部其它的MCU。外部MCU的数据通过SlaveFIFO模式已经用CYpress Console软件不断的读出来了!
可是我把端点2设为OUT端点用CYpress Console软件确发不出来,提示Bulk OUT failed
下面是我关于设置端点的固件程序。请前辈们给我指出问题!
BREAKPT &= ~bmBPEN; // to see BKPT LED go out TGE
Rwuen = TRUE; // Enable remote-wakeup
OEE=0xFF;
IOE=0x00;
// set the CPU clock to 48MHz
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
// set the slave FIFO interface to 48MHz
//IFCONFIG |= 0x40;
IFCONFIG=0xcb;
SYNCDELAY;
REVCTL=0x03;
SYNCDELAY;
EP1OUTCFG = 0xA0;
EP1INCFG = 0xA0;
SYNCDELAY; // see TRM section 15.14
EP2CFG = 0xA2;
SYNCDELAY;
EP4CFG = 0xA0;
SYNCDELAY;
EP6CFG = 0xE2;
SYNCDELAY;
EP8CFG = 0xE0;
SYNCDELAY;
FIFORESET=0x80;
SYNCDELAY;
FIFORESET=0x08;
SYNCDELAY;
FIFORESET=0x00;
SYNCDELAY;
EP6FIFOCFG=0x0C;
SYNCDELAY;
EP2FIFOCFG=0x10;
SYNCDELAY;
EP2AUTOINLENH=0x02;
SYNCDELAY;
EP2AUTOINLENL=0x00;
SYNCDELAY;
EP2BCL = 0x80; // arm EP2OUT by writing byte count w/skip.
SYNCDELAY;
EP2BCL = 0x80;
SYNCDELAY;
EP4BCL = 0x80; // arm EP4OUT by writing byte count w/skip.
SYNCDELAY;
EP4BCL = 0x80;
FIFORESET=0x80;
SYNCDELAY;
FIFORESET=0x02;
SYNCDELAY;
FIFORESET=0x04;
SYNCDELAY;
FIFORESET=0x06;
SYNCDELAY;
FIFORESET=0x08;
SYNCDELAY;
FIFORESET=0x00;
SYNCDELAY;
// enable dual autopointer feature
AUTOPTRSETUP |= 0x01; |