cancel
Showing results for 
Search instead for 
Did you mean: 

MCU halted after programming, not running application

Tristan Robitaille
Associate
Posted on July 07, 2017 at 22:58

Hi,

I'm developing a project around the STSPIN32F0 (on a custom board), which embeds an STM32F031C6. I can connect and download code to the MCU using ST-Link Utility and the ST-Link v2 integrated into an STM32F4 Discovery board.

The problem arises after successful code download. The MCU stays halted and doesn't run the code at all as well as disconnects from ST-Link Utility. The weird part is that I used to be able to program the MCU

perfectly

 a few days ago and it would run the code as expected, but that is consistently no longer the case.

Could hardware damage have caused this problem?

For reference, I tested uploading a program to the STM32F4 Discovery board and it runs the application without a problem. I am also not able to debug my STSPIN32F0 in AC6 System Workbench using OpenOCD (getting the dreaded Failed to execute MI command: -target-select remote localhost:3333 error), but I am able to debug the Discovery board.

Thanks for looking into this!

Tristan

#stm32 #stspin32f0 #lockup #st-link-utility #halt-cpu
1 REPLY 1
Posted on July 09, 2017 at 23:22

Does the code from a couple of days ago still run?

What did you change?

Do you do anything that would put the core to sleep? WFI in a loop?

Do you reprogram, reconfigure, or generally interfere with the SWD's connections SWCLK (PA14) /SWDIO (PA13)?

One can generally stop it running your code by pulling BOOT0 high. You should still be able to read memory and inspect 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..