cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Virtual Com port example

wmaguire
Associate II
Posted on November 19, 2008 at 04:55

STM32 Virtual Com port example

5 REPLIES 5
wmaguire
Associate II
Posted on May 17, 2011 at 12:51

Hi There

I am running the STM32F103xB USB Virtual Com Port Example and with the following Hyperterminal settings, Baud Rate 115200, Stop 1, Parity None and Hardware Flow Control I can receive characters I type in Hyperterminal on the target but the USB_To_USART_Send_Data does not appear to be sending them back to Hyperterminal. I suspect it is something simple I am missing but would appreciate it if anyone out there had this problem and know of a workaround

Regards

Walt 🙂

jj
Associate II
Posted on May 17, 2011 at 12:51

@ Wmaguire,

a) does your USB_To_USART_Send_Data code appear to execute correctly? Suggest that you add a simple Led blink after each char transmitted to confirm that at least the code is running.

b) disable the hardware flow control - a
franco2399
Associate II
Posted on May 17, 2011 at 12:51

Hy Wmaguire,

I haved use the USB function trying the:

-Keil STM32 board and relative example.

-IRA stm32 DEMO BOARD and relative example.

It's working well and with Hyperterminal: I send and receive fron PC using the loop back on usart pin (connect togheder).

The hyperterminal settings are:

- 38400 baud ( but this it is not important)

- no parity ( but this it is not important)

- no control flow !!

By

wmaguire
Associate II
Posted on May 17, 2011 at 12:51

Hi, thanks for the reply, I managed to get it to work by altering the USB code, so now I can send and receive characters to the USB. I also modified it to support stdin, and that works fine. I am now having difficulty using the example as intended. By this I mean, I run the app with no modifications and open up 2 hyperterminals on my pc with a null modem connection, to see if I can send an receive from one to the other. So, hyperterminal session commuicates with the virtual com port and another session communicates on a serial port. Can send characters via the virtual com port, no problems, but receiving is not good, I loose almost every second character typed. Looks like handshaking issue. Will investigate further.

Regards

Walter

wmaguire
Associate II
Posted on May 17, 2011 at 12:51

Hi all,

I found sometime to look at the VCP code in detail. Looks like very limited design was done on the solution and therefore prone to all sorts of race conditions, both on the UART and USB side. I wonder will ST provide a better example in the future

Regards

Walt