cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery USB Virtual Comm Port Example

waleedaslam89
Associate II
Posted on August 03, 2012 at 12:20

Does any one have got the USB Virtual Comm port Example for Stm f4 discovery board ??

 
8 REPLIES 8
Posted on August 03, 2012 at 14:55

Yes, I ported mine from the USB Host library v2.1.0, and connects to USART2

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sir
Associate
Posted on August 03, 2012 at 15:21

Could you share it with others?

Thanks.

Posted on August 03, 2012 at 20:56

https://docs.google.com/open?id=0B7OY5pub_GfIdnREeExyRWNXbFE

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bruce2
Associate II
Posted on July 11, 2013 at 17:30

Nice work. This is the best one I can find for STM32F4XX USB virtual COM port.  I have ever found two examples from github, or their own website, but one is not compilable, and 

other one has some defects in code when I run it. 

Thanks for sharing. 

Posted on July 11, 2013 at 20:36

Thanks, some effort was put into it to try and make it as clean and free standing as possible.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
bruce2
Associate II
Posted on July 11, 2013 at 21:11

Sorry to bother again. But when I run the program, it is OK to receive data from a PC, but when I want to send some data back to PC, my program seems have a problem. 

The first test I did is to connect PA2 (TX) with PA3 (RX) and I use Tera Term to send a data. I hope to see what I sent. But the program seems halt or go to exception.

The second test I did is to use a CP2012 board to send a data from one COM port and hope the discovery board can receive that and send it via another COM port to PC.  But it also has a problem when I sent a data from CP2102 board to the UART 2 and STM32F4 sends it back via virtual COM port to PC. I noticed if I don't put data into APP_Rx_Buffer[], the program won't halt. But I can use a LED to indicate the USART2 Rx interrupt fired. 

By the way, I use the GNU ARM toolchain to compile the source code. But I am not sure if that is the cause or not. 

Posted on July 12, 2013 at 02:42

Can you do the loopback check with the provided .HEX file?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Wood.Andy
Associate III
Posted on September 02, 2014 at 20:09

Hi Clive

It works great - like all your code does ;)

Yet again you have saved me a load of time and trouble...

Thanks

Andy.