1 Reply Latest reply on Feb 12, 2018 3:22 AM by yyca

    Interfacing FX2LP with Image Sensor

    liuwei

      Interfacing FX2LP™ with Image Sensor

      I  don't know how to do this in the  TD_POLL

      I use the EP2  bulk  in   512*4   autoin   8bit

       

      I want to  bulk the 752*480@54 fps  RAW data to the host.

      so, how I can  insert  a  512 package  per frame?

       

      1. when the INT0 is falling edge , the frame is end, but the FIFO is not full,  how to commit it  to the host?

      2. the doc write the step

       

           1.  CONFIGURE IN ENDPOINT : MANUALMODE

           2.  COMMIT 512 TO HOST

           3. CONFIGURE IN END POINT : AUTO MODE

       

          how to do it  on the EP2?

       

       

      /////////////////////////////////////////////////////

      void ISR_EXTR0(void) interrupt 0                         

      {

        TCON &= 0xFD;         // Clear INT0  TCON.1 Flag . This is also automatically cleared by hardware.

       

           Insert_flag = 1;

      }

       

       

      ////////////////////////////////////////////////////////////////////////////////////////////////////////

      void TD_Poll(void) // Called repeatedly while the device is idle

      {

      if(Insert_flag == 1)

      {

       

      if(!(EP24FIFOFLGS & 0x02)) // 如果不空  发出去

      {

      INPKTEND = 0x02;

      SYNCDELAY;

      }

       

      while( !(EP24FIFOFLGS & 0x02)) // 不空就等  等到空

      {

      ;

      }

       

      FIFORESET = 0x80; // initiate the “source packet” sequence

      SYNCDELAY;

      FIFORESET = 0x82;

      SYNCDELAY;

      FIFORESET = 0x00;

       

       

      EP2FIFOBUF[ 0 ] = 0x01; // <STX>, packet start of text msg

      EP2FIFOBUF[ 1 ] = 0x02; // <ACK>

      EP2FIFOBUF[ 2 ] = 0x03; // <HEARTBEAT>

      EP2FIFOBUF[ 3 ] = 0x04; // <ETX>, packet end of text msg

      SYNCDELAY;

      EP2BCH = 0x02;

      SYNCDELAY;

      EP2BCL = 0x00; // pass newly-sourced buffer on to hos

       

       

      Insert_flag = 0;

       

      }

      }

        • 1. Re: Interfacing FX2LP with Image Sensor
          yyca

          Hi Liuwei,


          Regarding to your question,

           

               1.  CONFIGURE IN ENDPOINT : MANUALMODE

               2.  COMMIT 512 TO HOST

               3. CONFIGURE IN END POINT : AUTO MODE

          Can you let me know which document you are refering?

           

          We recommend you configure the FX2LP as AUTO IN mode due to the limited performance of 8051 core. In addition, what's the meaning of the question

          how I can  insert  a  512 package  per frame?