cancel
Showing results for 
Search instead for 
Did you mean: 

virtual com port send data

macryant
Associate II
Posted on November 25, 2009 at 04:07

virtual com port send data

3 REPLIES 3
macryant
Associate II
Posted on May 17, 2011 at 13:31

hi, i am newbie to stm32, and i got an evaluation board of mcbstm32 for stm32f103.

I got the official sample code for this board for USB to Virtual ComPort test.

After the systemInit and usbInit

Code:

<BR> Set_System(); <BR> Set_USBClock(); <BR> USB_Interrupts_Config(); <BR> USB_Init(); <BR>

there is a while loop

Code:

<BR> while (1) <BR> { <BR> if (count_out != 0) <BR> { <BR> USB_To_USART_Send_Data(&buffer_out[0], count_out); <BR> count_out = 0; <BR> } <BR> } <BR>

will USB_To_USART_Send_Data(&buffer_out[0], count_out);this line send the data to comport? I have comport sniffer in my pc, i can only see the device connect and disconnect via that. But I cannot see the data send from the stm board.

Do I need to have another PC program running on PC to open the relative com port and receive the data?

And in that while loop, when will ''count_out'' not equal to 0? and when will the board send data to usart?

[ This message was edited by: macryant on 24-11-2009 08:54 ]

armmcu
Associate II
Posted on May 17, 2011 at 13:31

I guess the PC application used in the communication is Windows HyperTerminal.

st3
Associate II
Posted on May 17, 2011 at 13:31

Quote:

Do I need to have another PC program running on PC to open the relative com port and receive the data?

Yes, of course you do!

Just like a real COM port - if there is no application using that COM port, then there is nothing to receive any data sent to it!