cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8 USB VCP PROBLEM (MPU RESET)

Sean Brooks
Associate
Posted on July 16, 2018 at 02:23

Hi everyone, I am wondering if someone can help me, I want to make a device that uses the onboard USB VCP

on the STM32F103C8

I have set up using CubeMX an using keil

my problem is while the USB is connected to my PC...  and the MPU's reset button is press I can no longer use my virtual com port

the only way I can get it working again is to disconnect the sub and plug it back in

has anybody got the code to make the USB do a soft disconnect when the MPU is soft reset

thank you

5 REPLIES 5
AvaTar
Lead
Posted on July 16, 2018 at 09:19

You are talking about a Nucleo board, with a ST-Link V2.1 ?

Are you sure it's not a problem on PC side ?

If you use a dumb terminal program that does not properly release the COM port, it could remain blocked until a reboot or removal (in case of an USB VCP).

Posted on July 16, 2018 at 11:06

hi, no i am not using a stlink, my programming is a ulink2

no i have tried connecting to the pc without connecting to a putty and terminal

but still when the press the restart button

i am using my own pcb, i am using the on chip USB

or is it better using one of the UART and USB to serial chips

Posted on July 16, 2018 at 11:43

Is VCP the same as CDC ?

on my machine Win10 using TeraTerm the USB CDC works well.Select any baud rate, without issue.

This COM4 is released when I press the Reset button.

and is re-established when I release Rest button most of the time, but not always.

However, TeraTerm usually doesn't work after a board reset.

I have to check the Device manager to see the COM4 is happy or not.

I have to press the Reset Button a few times and hold for a second or two then release..

then COM4 comes back in device manager and TeraTerm will see it again after you either exit TeraTerm or Select a different COM port and then go back to COM4, then TeraTerm will work again.

Posted on July 16, 2018 at 15:24

Then I'm not sure what VCP you speak about. A USB/VCP implementation on the target ?

Or some ulink functionality ?

Posted on July 16, 2018 at 15:28

to achieve a Virtual COM port on the PC, its our USB-CDC-device interface.