In the past couple days I was studying the communication between STM32 and PC via CDC/VCP over usb. The code seems simple and works on F4 discovery board, but it just didn\t work on my own board. After searching website, I found there are lots of people may have this kind of problem. Therefore I summarize the problem and put into a file.
The sample code can be download via the public repository.
You can download a free tool there too to monitor the data sent via the com.
I attached a complete introduction file in this post.