2020-02-05 07:31 AM
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 !
2020-02-05 08:40 AM
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.
2020-02-07 04:29 AM
You was right about the BOOT0 pin. Now it's working very fine on power up ! Thanks a lot.
2020-02-11 03:57 AM
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.