cancel
Showing results for 
Search instead for 
Did you mean: 

STlink Getting Frequently Disconnected when Switching MOSFETs

GladsonT
Associate

I am developing a PMSM motor controller using STM32F103C8T6. I want to check the variables on live expression while I am running the motor. But as soon as I increase the current draw of motor, the values on the live expression starts to show random values or blank fields. and in the console, it prints "Target is not responding, retrying...". Why might this be happening?

I am having this issue on a custom PCB that I have built. I have made a similar PCB with bigger form factor and this issue is slightly lower in that PCB. What could be the causes of this issue? and what precautions should be taken to prevent this?

2 REPLIES 2
GMA
ST Employee

Hello @GladsonT,

You can try decreasing the used Baudrate to be less parasite sensitive.
Check with a scope DC supply or USART signals to check your power board impact on control board.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
Uwe Bonnes
Principal III

Add more ground connections between target and debugger.