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

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

cross mob
Anonymous
Not applicable


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?

0 Likes
2 Replies
Anonymous
Not applicable

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 

0 Likes
Anonymous
Not applicable
        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?   
0 Likes