Can i use custom length in slave fifo mode?

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

cross mob
Anonymous
Not applicable

Hi 

   

 

   

I want to use like following

   

 

   

LONG length = 2592// custom length

   
        
   
    if (USBDevice->BulkInEndPt) {   
   
     USBDevice->BulkInEndPt->XferData(buf, length);         
   
        
   
    But this is happen to error in PC application.   
   
        
   
        
   
    Can i use custom length in slave fifo mode?   
0 Likes
3 Replies
Anonymous
Not applicable
        What is the error code that you're getting? One thing that comes to mind is if you request 2592 bytes and all that the device is sending are 512 byte packets then there is one possible error scenarios might run into. After five 512 byte transfers the device sends a 512 byte packet (or any packet size greater than 32 bytes) will lead to buffer overflow causing error.   
0 Likes
Anonymous
Not applicable

You said that "After five 512 byte transfers the device sends a 512 byte packet (or any packet size greater than 32 bytes) will lead to buffer overflow causing error."

   

Did you mean that After six 512 byte transfer then ignore 480 Bytes or something else?

0 Likes
Anonymous
Not applicable

 Yes you right 

   

I fix them. 

   

Thanks

0 Likes