cancel
Showing results for 
Search instead for 
Did you mean: 

My STM32 keeps disconnecting from my computer during runtime when using STMCubeMonitor.

Rvan .9
Associate II

Good day.

So I am busy with my final year project, where the goal is to control the speed of a DC motor by reading the armature voltage and current, and then estimating the speed of the motor. I am using the STMCubeMonitor to provide a reference speed, and then the estimated speed is plotted vs the reference speed in the Cube Monitor. I have 1 USB port available on my laptop, therefore I tried using a USB Hub to connect my external mouse and the STM32. When I have this configuration, as soon as a reference speed is entered, the motor does as expected and increases the PWM to reach the desired speed by varyng the voltage, but then the STM disconnects and the monitor stops. I then tried unplugging my mouse, and pluging the STM32 straight into the laptop's USB port. The STM then does not disconnect anymore, but as soon as I set a reference speed, my trackpad stops working and jumps around like crazy and therefore can't enter another reference speed. I have read some issues people are having and someone mentioned that I need to set some parameters for the STlink to work and that the STM still receives enough power to run. I have had the exact same setup yesterday, and everything was working as expected so I would really appreciate if anyone could help me with any possible solutions. More information about the project can be provided if needed.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions
stephane.legargeant
ST Employee

Hello

It seems that there is something weird around USB. It looks strange, may be there could be some ground loop between the PC and other equipment ?

Are you using an external power supply for the motor or do you have connection with other equipment ?

 If yes, and if you have a laptop, you can try to disconnect the PC power supply and run on batteries. (disconnect also network cable, external HDD, anything linked to outside world.)

And are you using a hub with power supply or is it power by the pc ?  

Best regards

Stephane

View solution in original post

2 REPLIES 2
stephane.legargeant
ST Employee

Hello

It seems that there is something weird around USB. It looks strange, may be there could be some ground loop between the PC and other equipment ?

Are you using an external power supply for the motor or do you have connection with other equipment ?

 If yes, and if you have a laptop, you can try to disconnect the PC power supply and run on batteries. (disconnect also network cable, external HDD, anything linked to outside world.)

And are you using a hub with power supply or is it power by the pc ?  

Best regards

Stephane

Richard.Chvr
ST Employee

Closing the ticket, no update since a while

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.