Author Topic: NOOB boot question STM32  (Read 407 times)

0 Members and 1 Guest are viewing this topic.

Offline anda3243Topic starter

  • Contributor
  • Posts: 44
  • Country: cn
  • Product development professional, still learning
    • Check out our ThreadTitan product
NOOB boot question STM32
« on: May 03, 2022, 08:49:35 am »
Hello

I have connected and been able to program my MCU and board.
Adventures in setting this up can be found here
https://www.eevblog.com/forum/microcontrollers/stm32f103t8u6-not-recognized-by-cubeide-as-genuine/

Now I am using Crosworks IDE from Rowley and I am able to create the basic functions I need.

So far the board is powered from the ST-Link V2 programmer. And the SW can be initiated via the IDE and it works as expected.

Now I want to power my board from a battery, and have it boot up when VCC is applied. But I can not get it to work. I can only initiate it via the programmer and IDE, but not on its own.
I am sure that there is some simple setting, but I have spent hours on google without anything useful.
I only need a simple function. When power is applied, it should boot up.
I have a breadboard prototype, and it powers up when voltage is applied, as expected. But not the custom board with the smaller mcu.

I have tried pulling BOOT0 high and BOOT0 low during programming, without any luck.

I am new to programming, and I have been able to get along quite good with youtube tutorials and articles, but this seems to be a topic that is not covered very well. Or I am not searching for the right keywords.

Thank you very much in advance!
 

Offline AndyC_772

  • Super Contributor
  • ***
  • Posts: 4228
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: NOOB boot question STM32
« Reply #1 on: May 03, 2022, 11:16:32 am »
Set the preprocessor definition STARTUP_FROM_RESET.

You'll find out where it's used and why if you open up the system file STM32_Startup.s

Offline anda3243Topic starter

  • Contributor
  • Posts: 44
  • Country: cn
  • Product development professional, still learning
    • Check out our ThreadTitan product
Re: NOOB boot question STM32
« Reply #2 on: May 03, 2022, 11:54:03 am »
Thank you Andy

I will do some reading and testing and report back.
 

Offline anda3243Topic starter

  • Contributor
  • Posts: 44
  • Country: cn
  • Product development professional, still learning
    • Check out our ThreadTitan product
Re: NOOB boot question STM32
« Reply #3 on: May 03, 2022, 12:28:02 pm »
SOLVED

Set the preprocessor definition STARTUP_FROM_RESET.

You'll find out where it's used and why if you open up the system file STM32_Startup.s

Thank you, it worked. I even found some more info about it.
https://electronics.stackexchange.com/questions/359381/rowley-crossworks-stm32-start-from-reset
 
The following users thanked this post: AndyC_772


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf