Skip to main content
anbeyon2
Associate II
August 24, 2010
Question

STM32 Virtual Com Port 64Byte Limit

  • August 24, 2010
  • 2 replies
  • 873 views
Posted on August 24, 2010 at 23:19

STM32 Virtual Com Port 64Byte Limit

    This topic has been closed for replies.

    2 replies

    marcomarco9
    Associate
    May 17, 2011
    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
    Visitor II
    May 17, 2011
    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

    .