My STM32 keeps disconnecting from my computer during runtime when using STMCubeMonitor.
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.
