cancel
Showing results for 
Search instead for 
Did you mean: 

Why my STM32 doesn't start to run ?

fDNTI
Associate II

After upload my program into a stm32F103C8T6, the program doesn't start. I just use STM32CUBE-MX to configure my mcu, and I just add some blinking on 5 output (push/pull). But after reset my output seems to stay in high inpedance ? Does Mcu start itself ? Do I miss a configuration step in STM32CUBE-MX ?

regards

7 REPLIES 7

CubeMX is not a compiler, you need to build the project in a tool chain, and download and debug it from there.

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

Yes of course, Sorry I didn't mentioned it. I obviously Build project without error, before uploading. I hadn't choice I need .hex file or .bin 🙂

If this is a custom board be wary that BOOT0 needs to be pulled LOW. The chip should run code out of FLASH at reset, and starting a debugger should initiate a "run to main()" to allow you to start your session.

Recommend stepping the code, and reviewing the peripheral settings for RCC, GPIO, etc through debugger's "Peripheral View"

Using PA13/PA14 and other SWD/JTAG pins on F1 can interfere with the ability to debug.

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

There's a beginning to everything, but it's not help ! I already done basic steps, this is the reason why I ask help, to have a higher level of help !

My (other) problem is I reuse a board and debug pins are not welded ! I just added 4 pins to upload with st-link. I haven't quartz on board so I need to use internal clock, Is there something special to start it ?

The part starts running from the 8 MHz HSI, if you do nothing it will continue with that clock.

If you want the part to run at 64 MHz you'd need to configure the PLL parameters, picking the HSI as the source, and not attempt to start the HSE which you don't have.

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