2024-04-11 01:59 AM
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.
Which configuration I am missing?
Thanks,
Alberto
Solved! Go to Solution.
2024-04-11 02:20 AM - edited 2024-04-11 02:23 AM
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.
2024-04-11 02:06 AM
Shouldn't that be the default behaviour for code situated at 0x08000000?
Unless you floated BOOT0 in your design instead of pulling it low.
2024-04-11 02:08 AM
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.
2024-04-11 02:13 AM
With the programmer disconnected, does the code run after a pressing the RESET button, or power-cycling the board?
2024-04-11 02:16 AM
No, it does not run. I am powering the board through USB cable which is conneced to the computer.
2024-04-11 02:17 AM
@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?
2024-04-11 02:19 AM
Sorry. Yes, I am using the NUCLEO-F466RE board.
2024-04-11 02:20 AM - edited 2024-04-11 02:23 AM
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.
2024-04-11 02:29 AM
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