Is there a way to expand USBUART buffer size?

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

cross mob
Anonymous
Not applicable

Hello again, everyone!

So, I'm trying to send a lot of data from my computer to the PSoC5LP so I'm sending it via the USBUART.  The example showed the USBUART to be 64 bytes (words?) so I changed this number to 200.  My program wasn't acting like I expected so I looked at what's in the buffer and it seems to be clipping past buffer[63].  Is there a way to expand the USBUART buffer size, either in the module or the *.ini file?  Or is this just a limit to the communication protocol?

If anyone knows, that would be awesome.  The complication of my code goes up pretty quick if I have to send the data separately so I'm hoping it's possible to expand the buffer size.  Thanks!

1 Solution
3 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

maybe so?

extern uint8  myImage[];

.........

for(i=0;i<ArraySize/64;i++)   

{

   while(USBUART_CDCIsReady() == 0u){};   // Wait till component is ready to send more data to the PC

   USBUART_PutData( &myImage[64*i] ,64);  // send 64 byte to USBUART

}

0 Likes
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

jeremy,

Typically, to send 'a lot' of data, USB bulk transfer is used.

my estimate of standard USBUART transfer speed is ~1Mbaud. Alternative to USBUART is to use PSoC UART set to high speed

Undocumented features of Kitprog in CY8CKIT-059

0 Likes