szczys / stm32f0-discovery-basic-template

A template for builting STM23F0 ARM projects with GCC
122 stars 108 forks source link

Possibly wrong Reset_Handler in startup .s file ? #3

Open MrSpock opened 12 years ago

MrSpock commented 12 years ago

Hello,

Please correct me if I'm wrong but what would happend after pushing reset BTN on STM32F0DISCOVERY board ? I 'm assuming that program should be restarted and resume operation from start. Insted of it after pressing RESET sample led blinking program stops working. In order to resume normal work I have to turn off/on power.

Here is gdb output when pushing reset button on board:

Program received signal SIGINT, Interrupt.

Reset_Handler () at Device/startup_stm32f0xx.s:71

Src window: │70 Reset_Handler:

│71 ldr r0, =_estack
│72 mov sp, r0 /* set stack pointer */

Is this normal behavior ?

MrSpock commented 12 years ago

Sorry for formating - I wasn't expecting this after submiting my issue :/

szczys commented 12 years ago

You may be right. I experience a similar problem. After I program the chip (using OpenOCD) it runs just fine until I press the reset button. This causes it to freeze. But power cycling the board fixes the issue and then the reset button works as expected.

Unfortunately I don't know what is the root cause or how to fix it. Any thoughts?

MrSpock commented 12 years ago

Thanks for confirmation that you have similar symptoms. I have working similar template for STM32F1xx (gcc and make based build), so I will try compare those two in next few days so maybe solution will emerge.

temoto commented 11 years ago

@MrSpock i have the same problem on STM32F0d (first reset after programming using OpenOCD makes board freeze, power off-on fixes it) and would like to know if you found a solution.

a-golosnyak commented 9 years ago

Hallo. Have the same problem. MCU STM32F051C8. I try to use ST-Link on STM32VLDISCOVERY and STM32F4DISCOVERY boards. Help me please, Is any solutions?

a-golosnyak commented 9 years ago

Hallo, colleagues. 2 days later I found the cause of the problem. BOOT0 was not pull down.