cancel
Showing results for 
Search instead for 
Did you mean: 

CDC_Receive_FS max speed and how to accomplish it?

Evgeny Popov
Associate III

Hello guys,

I'm wondering how to accompish CDC_Receive_FS max speed, because as i understand the max Endpoint IN & OUT Packet size is 64 bytes, so i will need to receive around 4gb from the host, if it will take 1-2 days - i am okay with it. The problem is that i dont know how to make i properly, what i am doing now is looping in an endless loop and executing the cmd in a first byte of the 64 bytes package:

while (1)
 
 {
 
if (UserRxBufferFS[0] == 0x96)    // 96 in the first bytes is the cmd and rest 63 bytes is the data.
 
{      
 
 for(uint32_t i = 0 ; i <= 63 ; i++)  
 
{
 
	kyky[count1 + i] = UserRxBufferFS[i+1];
 
}			  
 count1 += 63;
 
if (count1 == 315)
 
{
count1 = 0;
WRITE_LEAF();
}
UserRxBufferFS[0] = 0;		
		}
 }

so what the code do, it is receiving 1byte cmd + 63 bytes data, and store it in the array buffer then after it receive 315 bytes it goes to the next sub WRITE_LEAF.

there are the two huge problems, the first one it is odd data length, i have to do more calcutaions on the host side because of it.And second one is the speed is too slow.

Any ideas, maybe some examples "how to do it properly"

This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0