2 Replies Latest reply on May 8, 2017 6:35 AM by lee.carter

    what is the exactly data type to get 32bit data by xferdata function?

    lee.carter


      Hello,

         

      In the slavefifo mode, as I know it supports 32bit mode, but How can I get "word data type" from XferData function not unsigned char?
      When I found xferdata function in the Cypress CYAPI Programmer's reference document, I just came across the below example snippet code. but it just used as "unsigned char data type" not word data type.

         

      In the 32bit slavefifo mode, How can I get data?

         

      So I want to know how can I get the data as a word data type?

         


      -------------------------------------------------------------------------------------------------
      Example (from CYUSB3KIT documents)

         


      CCyUSBDevice *USBDevice = new CCyUSBDevice(NULL);
      unsigned char buf[] = "hello  world";
      LONG length = 11;
       
      if (USBDevice->BulkOutEndPt)
      USBDevice->BulkOutEndPt->XferData(buf, length);
       
      -------------------------------------------------------------------------------------------------

         

       

         

      What if I have to get 32bit data as sequentially, is 32bit mode more faster about data transfer rate than 8bit mode?

        • 1. Re: what is the exactly data type to get 32bit data by xferdata function?
          Madhu Lakshmipathy

          Hi,

             

          The terms 8 Bit mode and 32 Bit mode are involved with the GPIF Interface only, As far as USB Interface is concerned the XferData deals only with bytes (8 Bits). The USB 3.0 Interface's XferData () can accomodate the speed of the data coming from the GPIF Irrespective of whether it is 8 Bit or 32 Bit.

             

          By the way, when dealing with large amount of super speed data, you are advised to use the Asynchronous mode (BeginDataXfer( ), WaitforXfer( ), FinishDataXfer( )) rather than Synchronous mode (XferData( ) ).

             

          Regards,

             

          - Madhu Sudhan

             

          Regards,

             

          - Madhu Sudhan 

          • 2. Re: what is the exactly data type to get 32bit data by xferdata function?
            lee.carter
                    Thanks for good advice. Especially I want to know more about "By the way, when dealing with large amount of super speed data, you are advised to use the Asynchronous mode (BeginDataXfer( ), WaitforXfer( ), FinishDataXfer( )) rather than Synchronous mode (XferData( ) )." Could you let me know a little bit more you advice asynchronouse mode?