cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Virtual Com Port 64Byte Limit

anbeyon2
Associate II
Posted on August 24, 2010 at 23:19

STM32 Virtual Com Port 64Byte Limit

2 REPLIES 2
marcomarco9
Associate II
Posted on May 17, 2011 at 14:04

I've used a second buffer more large than 64 bytes.

Everytime the usb interrupt occur check if there's a message in the 64bytes buffer.

If yes, copy the character received in the second buffer. Next time the usb interrupt occur append the caracther received in the same buffer. And so on.. 

When you receive one termination character clear the second buffer and restart.

Maybe there's a better way, but I've resolved in this way.

simonqian2
Associate II
Posted on May 17, 2011 at 14:04

1K is enough for UART_TX buffer, and for UART_RX buffer, as large as possible.

Here is my example.

Interrupt:

http://code.google.com/p/vsprog/source/browse/trunk/dongle/firmware/HW/stm32f10x_it.c

.

Functions:

http://code.google.com/p/vsprog/source/browse/trunk/dongle/firmware/HW/HW.c

.