cancel
Showing results for 
Search instead for 
Did you mean: 

Program stuck in startup_stm32f4xx.s

sommer
Associate II
Posted on August 28, 2015 at 10:58

I am trying to run an existing code developed in Eclipse + GCC in IAR workbench. After making all the related changes, the code compiles successfully. Now when I try to run the program, at the point where there is a call to 'Init_TIM' in main.c, which in turn calls HAL_TIM_Base_Start_IT(&TimHandle); This evidently ends up in reaching 

 /* Enable the Peripheral */

  __HAL_TIM_ENABLE(htim);

this point in stm32f4xx_hal_tim.c file. After this the program hangs without any further execution. When I break the debugging, I see that the program is currently stuck at TIM3_IRQHandler 

        B TIM3_IRQHandler

in the startup_stm32f4xx.s file. I have tried searching online for any help but couldn't find anything. I might be missing something quite simple but I don't realize what it is.

#stm
2 REPLIES 2
Nesrine M_O
Lead II
Posted on August 28, 2015 at 12:13

Hi lieber.sommer,

I think that you miss the definition of your Interrupt Handler in the stm32f4xx_it.c

void
TIMx_IRQHandler(
void
)
{ ….
}

-Syrine-
sommer
Associate II
Posted on August 28, 2015 at 13:11

I figured out that I have the stm32f4xx_it.c in the source directory but I have not included it in my IAR project. So stupid of me. Thanks for the reply Syrine.