2009-11-24 07:07 PM
virtual com port send data
2011-05-17 04:31 AM
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 usbInitCode:
<BR> Set_System(); <BR> Set_USBClock(); <BR> USB_Interrupts_Config(); <BR> USB_Init(); <BR>
there is a while loopCode:
<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 ]2011-05-17 04:31 AM
I guess the PC application used in the communication is Windows HyperTerminal.
2011-05-17 04:31 AM
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!