cancel
Showing results for 
Search instead for 
Did you mean: 

Custom board and ST-LINK : can't get a program to run on power up

HHUET.1
Associate II

Hi guys.

I'm somewhat new to STM32 programming.

I did a program that I can start on a custom board using ST LINK V2 debugger / programmer. If I unplug the ST Link, it continues to work well.

However, if I power off the board, I can't get the program to run on power up. I have to use the debugger again.

I would like to figure out how to start the program without the ST LINK.

Is there anything with boot0 and boot1 pins and the bootloader ? With the startup file ?

I’m using the STM32F207ZG MCU.

Thank you in advance !

3 REPLIES 3

BOOT0 should be pulled low to ensure your code runs at startup.

Instrument early via GPIO and/or USART, to get information about how your code is running and how far it gets.

Have HardFault_Handler() and Error_Handler() output actionable data to you can see if it found its way into those routines and why.

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

You was right about the BOOT0 pin. Now it's working very fine on power up ! Thanks a lot.

HHUET.1
Associate II

Hi,

I'm back with few questions :

I also have a micro-USB port on my board. Can I use it to program the MCU ? (It seems like I should set the BOOT0 to 1 before)

If I could program through USB, would I have to set the BOOT0 to 0 again after the programing, in order to have the program starting at power-up ?

Is there any advantage in programming through USB compared to programming with ST LINK ?

Thank you in advance.