cancel
Showing results for 
Search instead for 
Did you mean: 

Why Microcontroller is halted after Power-on Reset?

Vinod Kumar
Associate II

Hi,

I wrote a simple Led blinking program in STM32F303CB.

-> On power-on reset Controller is not getting started.

-> I used Internal Clock and External Clock

-> But the same behavior in both the cases.

Thanks.

11 REPLIES 11
TDK
Guru

Custom board? If it has power, it's running code somewhere. It could be in the bootloader if you have BOOT0 high or floating. It could be hung up somewhere in the initialization. You can attach a debugger without resetting to find out where it is.

If you feel a post has answered your question, please click "Accept as Solution".

Could you perhaps use a debugger?

Floating BOOT0 ? Pull it low.

Stuck in a while(1) loop waiting forever? Error_Handler(), HardFault_Handler(), some timeout?

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

Hi,

Thanks for the suggestion.

Yes, These boards are customized and the design is simple.

I tested by maintaining BOOT0 pin HIGH and LOW.

-> when the BOOT0 pin is HIGH, I observed the same issue (microcontroller hang during power up and resume to work when probing with multimeter ON OSC IN pin).

-> when the BOOT0 pin is LOW, the above issue is not observed on 9/10 boards. On the 10th board, BOOT0 pin status doesn't play any effect and the above scenario is repeated on this board.

Can you please explain more info on the BOOT0 pin, We left the BOOT0 pin as floating assuming that there is no effect as we don't have multiple boot locations.

Thanks,

Vinod Kumar.

BOOT0 being high causes that the internal bootloader is running instead of your program.

Just pull BOOT0 low.

JW

Hi,

Thanks for the information.

Can you please tell me is there any difference by keeping the BOOT0 pin floating and pull LOW.

Thanks,

Vinod Kumar

> Can you please tell me is there any difference by keeping the BOOT0 pin floating and pull LOW.

Yes, floating leads to undefined behavior. It may run the bootloader, or it may run user code.

If you feel a post has answered your question, please click "Accept as Solution".

In the floating state, with a slow rising supply, it might look highish ​or lowish, and often boots into the wrong mode.

The proper design would pull it low ​

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

Hi,

Is there any way to make the BOOT0 pin pull-down by software?

Thanks,

Vinod Kumar.

Not on that chip.
If you feel a post has answered your question, please click "Accept as Solution".