cancel
Showing results for 
Search instead for 
Did you mean: 

Code won't run without pressing reset button

IPrin.1
Associate II

My code runs without issue when the STM Nucleo is connected to the laptop, but if I try to run it without connection to PC, I have to press the reset button before the code will run.

I am using STM32CubeIDE and cannot find a solution relevant to that environment.

I can of course create a hardware solution to this but I would rather achieve a solution programmatically if possible.

13 REPLIES 13

> Adding a short delay at the start of main() has fixed the startup issue

How?

JW

Please, explain your solution, did you use HAL_Delay(), a for() ?, where exactly did you put it?, at the very beginning of main()? After HAL_Init()? At the startup file? . Please I'm having the same issue with 3 Nucleo 144 STM32F446ZE. Thank you for your time.

Suggest at the VERY BEGINNING, with simple delay

volatile int i = 100000000;

while(i--);

Not clear what or how this worked, the OP lacked specifics. So perhaps TRY some things, and see if you have the same problem or a different one.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..