2021-07-20 09:47 AM
Hi,
I'm currently using the STM32F446RE with the STM32CubeIDE. My problem at this moment is, after flashing the code it only runs when I debug through CubeIDE, but if I connect the USB it is necessary that the B2 (PA0) is pressed for the code to start running.
My question is, how can I disable this so that whenever my board receives power the code starts running without the need for the button to be pressed?
Thank you!
2021-07-20 10:43 AM
The NUCLEO-F446RE board has B2 connected to NRST, not PA0. Are you using that or is this a custom board?
The mcu starts running code when it is powered. Either user code or system bootloader depending on your settings. If it's "not working", it may have gotten stuck somewhere during initialization, possibly waiting for HSE to come up. You can attach a debugger when it's in the unknown state without resetting it to figure out where it is.