2018-02-21 05:09 AM
I'm trying to implement Virtual Com Port on STM32F3. I use IAR.
I've included all files from a demo project.
However I have numerous errors while compiling the project. Struggling for hours I came to this question
Is there any compiled project with VCP for STM32F3?
Note: this post was migrated and contained many threaded conversations, some content may be missing.2018-02-22 02:11 AM
https://community.st.com/0D50X00009XkeivSAB
Specifically, this post:
2018-02-22 02:45 AM
MY DEAR LORD!!!
IS THERE ANY ADEQUATE PERSON ON THE FORUM UNDERSTANDING ME???
2018-02-22 03:12 AM
Neil.Andrew wrote:
Hugely
more effort is required in getting the USB stack working!!!As demonstrated in the OP's previous thread:
2018-02-22 03:22 AM
Right, you need to understand USB callback when receiving data from the USB, need to take care of unfinished transmit to make transmit reliably. A lot of stuff. That's why I promoted ST-LINK Virtual COM.
2018-02-22 03:47 AM
You seem to be the one failing to understand.
As has been explained a number of times, there are two possible ways to have a 'VCP' on a Nucleo or Discovery board.
You have not yet clarified which particular 'VCP' option you require.
So, please answer the simple question: Is using the VCP provided by the ST-Link sufficient for you?
2018-02-22 04:01 AM
Provided by the ST-LINK??? How ST-LINK involved here?
I have STM32F3DISCOVERY BOARD (MB1035B)
I debug/program on USB-LINK connector. And VCP communication I what to run on USB USER connector.
A piece of the demo code
while ( 1 ) { if (bDeviceState == CONFIGURED) { STM_EVAL_LEDOn(LED6); CDC_Receive_DATA(); /* Check to see if we have data yet */ if (Receive_length != 0) { STM_EVAL_LEDOn(LED4); int i; for (i = 0; i < Receive_length; i++) { localBuffer[i] = Receive_Buffer[i]; } CDC_Send_DATA(localBuffer, Receive_length); Receive_length = 0; } } }The problem I can not compile the demo so I want to see compiled example for IAR.
Jesus Christ
! What I'm asking? NASA project?2018-02-22 04:10 AM
Stay calm. It's a user forum, the voluntary one. You are trying in this piece of code USB/CDC. Not the ST_LINK
2018-02-22 04:14 AM
erenburg.evgeny.002 wrote:
How ST-LINK involved here?
For goodness sake - have you not read any of the replies in this thread??
Look again at this picture:
There is no target software at all required to use the ST-Link's VCP connection - as far as the target STM32 is concerned, it is just a UART connection.
This is by far the simplest way to get a VCP connection from a Nucleo or Discovery board to a PC.
So, again, why can you not simply use the VCP provided by the ST-Link??
2018-02-22 04:16 AM
The B version of the board probably does not have the Virtual COM emulated by the ST_link so you have no choice and need to use USB/CDC.
2018-02-22 04:18 AM
Or use a different board.
Or use a separate USB-to-UART converter; eg,