1 Reply Latest reply on Apr 25, 2011 8:04 AM by anand.srinivasan.asokan

    Faw questions about 68013

    zhang.liang

      my chip is 68013A ,ep 2 IN,bulk,512 * 4.

         

      My code:

         

      void TD_Init(void)             // Called once at startup
      {
         // set the CPU clock to 48MHz
         CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
          // set the slave FIFO interface to 48MHz and work in the slave FIFO
          SYNCDELAY;
          IFCONFIG = 0xc3;

         

       SYNCDELAY;
       REVCTL |= 0x03; // REVCTL.0 and REVCTL.1 set to 1
       SYNCDELAY;                    // see TRM section 15.14
         EP2CFG = 0xe8;
      // SYNCDELAY;
      // FIFORESET = 0x80; // Reset the FIFO
          SYNCDELAY;
         EP2FIFOCFG |= 0x08;
       SYNCDELAY;
          FIFOPINPOLAR |= 0x04; //set valid active high
       SYNCDELAY;
         EP2FIFOCFG &= ~0x01;

         

       //init EP2 ram
         SYNCDELAY;                   
         EP2BCL = 0x80;                // arm EP2OUT by writing byte count w/skip.
         SYNCDELAY;                   
         EP2BCL = 0x80;                // arm EP2OUT by writing byte count w/skip.
       SYNCDELAY;                   
         EP2BCL = 0x80;                // arm EP2OUT by writing byte count w/skip.
       SYNCDELAY;                   
         EP2BCL = 0x80;                // arm EP2OUT by writing byte count w/skip.

         

         // enable dual autopointer feature
         AUTOPTRSETUP |= 0x01;
      }

         


      void TD_Poll(void)              // Called repeatedly while the device is idle
      {
       IFCONFIG = 0x03;
      }

         

       

         

      questions as follows:

         

      1,cann't set IFCONFIG = 0x03 in the TD_Init(); when I set it in the TD_Init(),68013 can work normal.

         

          so I set IFCONFIG in the TD_Poll(void)  .

         

         buf I want to know why it cann't work in the TD_Init();

         

      2,68013 cann't set 1024 * 4.why?

         

      3,when arm read 68013's FIFO ,sometimes drop packet.

         

         my logic is :    tuner -> 68013 -> arm.

         

        tuner data is 5M byte per second send to 68013,and arm read 68013  in usb high speed.

         

       but it alwayes drop,and Fullflag sometimes is low.

         

        how to do?

         

       and iso is more good then bulk?

        • 1. Re: Faw questions about 68013
          anand.srinivasan.asokan

          Hi,

             

          What is the exact error condition you are seeing when you set IFCONFIG to 0x03 in TD_Init()??
          In the example posted above you've set it to 0xc3. Does it work fine with this??

             

          You've posted quite a few questions. It would be a good idea to open a tech support case through MyAccount -> MyCases.

             

          Regards,

             

          Anand