Skip to main content
Associate
April 11, 2024
Solved

STM32 Cube Programmer

  • April 11, 2024
  • 2 replies
  • 2589 views

Hi,

I want to load a program so that when I unplug from computer and plug it again it is still running. To load the binary, I am using STM32 Cube Programmer. The program is correctly running, but when I click on the "Disconnect" button it stops running. It only starts running again when I click on the "Connect" button.

Alberto4_0-1712825901865.png

Which configuration I am missing?

Thanks,
Alberto

This topic has been closed for replies.
Best answer by Tesla DeLorean

Then it's running your code. It's just not doing what you want/expect.

Not sure what connect the board to the computer and "still" running means exactly.  The program will start or restart, it doesn't continue to run.

You're going to need to present the problem more clearly

 

Perhaps have Error_Handler() and HardFault_Handler() set different LEDs so you can observe if it went there and died.

2 replies

Tesla DeLorean
Guru
April 11, 2024

Shouldn't that be the default behaviour for code situated at 0x08000000?

Unless you floated BOOT0 in your design instead of pulling it low.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
Alberto4Author
Associate
April 11, 2024

I am using the development board STM32F446RE and the BOOT0 pin is low.

I have also checked the "Run after programming" checkbox but I still get the same behaviour.

Andrew Neil
Super User
April 11, 2024

@Alberto4 wrote:

I am using the development board STM32F446RE .


That's the name of the chip - not the board.

So what board is that chip mounted on?

eg, is it the NUCLEO-F446RE?

 
 

AndrewNeil_3-1712826969611.png

https://www.st.com/en/evaluation-tools/nucleo-f446re.html 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
April 11, 2024

With the programmer disconnected, does the code run after a pressing the RESET button, or power-cycling the board?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Alberto4Author
Associate
April 11, 2024

No, it does not run. I am powering the board through USB cable which is conneced to the computer.

Andrew Neil
Super User
April 11, 2024

So what happens if you run it in the debugger?

Is the code getting stuck somewhere;  eg, Error_Handler() or HardFault_Handler() - as @Tesla DeLorean suggested

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.