2014-05-28 11:27 AM
Hello again Gentlemen!
I would like to download some sample code to help me to program the USB peripheral to use it as a Virtual COM port. I guess on the PC side I have to install the ST Micro Virtual COM port driver, right?!If believe that ST has sample code for this but I could not find it.Thanks,Gil #lmgtfy:-stm32-resources2014-05-28 11:52 AM
http://www.st.com/web/en/catalog/tools/PF257882
Red DOWNLOAD button, bottom of page.2014-05-29 02:46 PM
I downloaded the code and I was able to build it without error. I see the LEDs working fine and I see Win 7 recognizes my board as a VCP and assigned COM17 to it. I can open port 17 with Putty.
Now I'm trying to figure out how to send data from the board to Putty but it is not working.In app.c I have the following code in the main loop every 3 seconds: USART_SendData(EVAL_COM1, 'U'); USART_SendData(EVAL_COM1, 'S'); USART_SendData(EVAL_COM1, 'B'); USART_SendData(EVAL_COM1, '\r'); USART_SendData(EVAL_COM1, '\n');Nothing on Putty not even garbage. Would you be able to help out?I set a breakpoint inside of EVAL_COM_IRQHandler and the processor never landed there.Thanks much,Gil2014-05-29 03:33 PM
You must spin on the USART status waiting for TXE, you can't keep jamming the SendData
2014-05-29 06:00 PM
Thanks for your help, maybe I was not clear about what I was trying to do. The sample code you pointed to me is designed to work as a bridge between the uart on the eval board and the USB Host.
I was actually trying to send something to the host from within the code itself like a debug trace.so I found out to transmit to the host you need to do the following: APP_Rx_Buffer[APP_Rx_ptr_in] = character; APP_Rx_ptr_in++;Now I'm seeing my debug traces on Putty!I appreciate your help, you saved me many days of work!2014-05-29 06:00 PM
Cheers!