cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 module suddenly disconnected and not recognized

bagasprima
Associate II
Posted on November 27, 2015 at 03:50

Please help,

I was programming my STM32F4-Discovery with an ''ADCInterleaved'' code (from template) using Keil and suddenly my board get disconnected from my PC. The program load was smooth though, but after i want to test it with ''Start/Stop Debug Session'', an error window popped up saying that my board has been disconnected, thus the debug session exit for itself.

And after that my board always get ''USB Device not recognised'' error from Windows. And everytime I triy to load a program or start a debug session, it ended up with ''No ST-LINK detected'' error.

Is there anything I can do? I've tried connecting to different PC but no help. All I know is the indicator lamp still on, and I can guarantee that there is no short circuit (also my program is only ADC, there won't be any problem), so I guess there's nothing wrong with the hardware itself.

Does anyone have a similar problem? Please, I'm stuck here. (and sorry for my english)
4 REPLIES 4
Posted on November 27, 2015 at 04:16

Try connecting the BOOT pin to VDD, this will stop the code you loaded running on the board. If you get connectivity, erase the part using the ST-LINK Utilities.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
bagasprima
Associate II
Posted on November 27, 2015 at 04:32

Hi, clive1 thanks a bunch!

I've connected BOOT0 and VDD now the program stopped like you said, and voila the device is now recognised. But one thing, is there any problem if I load a program to STM (replacing the old ones) while connecting those pins? I'm being paranoid now. And by the way is it the same with ''erasing the part'' that you said earlier?

Thanks again.

Posted on November 27, 2015 at 12:19

The part continues to function normally, you can program and erase it, the BOOT pin just selects that it starts the System Loader, a safe harbour, instead of potentially broken user supplied code.

Take the jumper off, it will run your code again.

You need to look at exactly what your code is doing to break the debugger, check what pins are being reconfigured, or if the device is put in a low power mode, etc.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
bagasprima
Associate II
Posted on November 29, 2015 at 11:58

Thanks! I did those steps and it's been working normally from that time.