[FX2] Isochronous IN not working

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello

   

I try to setup an isochronous endpoint to read data from an external application. As it did not work out, I setup the following minimal example which does not work either. The example should simply feed the computer with data.

   

 

   
WORD i;  REVCTL = (1 << 1) | (1 << 0); // DYN_OUT, ENH_PKT SYNCDELAY;  CPUCS = (2 << 3) | (1 << 1); // 48MHz CPU clock, CLKOUT enable SYNCDELAY;  IFCONFIG = (1 << 7) | (1 << 6) | (1 << 3) | (3 << 0); // internal 48MHz FIFO clock, asynchronous I/O, slave FIFO SYNCDELAY;  EP2CFG = 0; // EP2: off SYNCDELAY; EP4CFG = 0; // EP4: off SYNCDELAY; EP6CFG = (1 << 7) | (1 << 6) | (1 << 4) | (2 << 0); // EP6: valid, in, isochronous, 512B, double buf SYNCDELAY; EP8CFG = 0; // EP8: off SYNCDELAY;  RESETFIFOS();  EP2FIFOCFG = 0; // EP2: off SYNCDELAY;  EP4FIFOCFG = 0; // EP4: off SYNCDELAY;  EP6FIFOCFG = (1 << 0); // EP6: 16bit //EP6FIFOCFG = (1 << 3) | (1 << 0); // EP6: AUTOIN, 16bit SYNCDELAY;  EP8FIFOCFG = 0; // EP8: off SYNCDELAY;  PORTACFG = 0; SYNCDELAY;  FIFOPINPOLAR = 0; // all FIFO control pins low-active SYNCDELAY;  USE_USB_INTS();  ENABLE_SUDAV(); ENABLE_USBRESET(); ENABLE_HISPEED();  EA = 1;  RENUMERATE_UNCOND();  while(TRUE) {     for(i=0;i<512;i++){         EP6FIFOBUF = 0xee;     }     EP6BCH = 0x02;     SYNCDELAY;     EP6BCL = 0x00;     SYNCDELAY; }
   

 

   

Whenever I try to read data from the endpoint, the FX2 always reports that there is no data available. How to fix this problem?

   

Thank you for your support!

   

 

   

Kind regards,
Peter

0 Likes
2 Replies
Anonymous
Not applicable

 Hi,

   

 

   

Endpoint configurations are not proper.

   

 

   

You have to use one of the endpoint configuration as shown in figure 2.5 in the datasheet http://www.cypress.com/?docID=45142

   

 

   

Regards,

   

Vikas.

0 Likes
Anonymous
Not applicable

Thank you for your response. Is 0xD2 no valid endpoint configuration (e.g. no. 1 in figure 2-5)? Do I have to configure all endpoints in order to use EP6?

   

Kind regards,
Peter
 

0 Likes