Skip to main content
Associate
October 19, 2023
Solved

By clicking the debug mode the program jumps to vector_stm32f407xx file and freezes.

  • October 19, 2023
  • 3 replies
  • 1074 views

I am using STM32F407ZET MCU and using Eclipse IDE. My PCB board is working fine, I check and verify. In my firmware I am using timer 6 as an interrupt and systick is used for freertos. But when I click on the debug option it jumps on the following function and freezes.

void __attribute__ ((section(".after_vectors")))

Default_Handler(void)

{

#if defined(DEBUG)

__DEBUG_BKPT();

#endif

while (1)

{

;

}

}

I tried with STM32CUBE IDE, it is working normal. What can be the reason?

This topic has been closed for replies.
Best answer by Abid

Thanks for the reply:

IQRHandler(); function was missing. I add the function and now my program does not stuck. 

void TIM6_DAC_IRQHandler(void)

{

/* USER CODE BEGIN TIM6_DAC_IRQn 0 */

 

/* USER CODE END TIM6_DAC_IRQn 0 */

HAL_TIM_IRQHandler(&htim6);

/* USER CODE BEGIN TIM6_DAC_IRQn 1 */

 

/* USER CODE END TIM6_DAC_IRQn 1 */

}

3 replies

TDK
October 19, 2023

> I am using STM32F407ZET MCU and using Eclipse IDE.

> I tried with STM32CUBE IDE, it is working normal.

Wouldn't that suggest it's an IDE issue? Why not just use STM32CubeIDE, as it's Eclipse-based anyway.

But jumping to default handler suggests ResetHandler is perhaps not properly defined or put in the vector table.

"If you feel a post has answered your question, please click ""Accept as Solution""."
ST Technical Moderator
October 19, 2023

Hello @Abid 

The issue could be related to the debugger settings or the startup file. You can check the initial SP and PC and it should point to Reset_Handler.

 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
AbidAuthorBest answer
Associate
October 20, 2023

Thanks for the reply:

IQRHandler(); function was missing. I add the function and now my program does not stuck. 

void TIM6_DAC_IRQHandler(void)

{

/* USER CODE BEGIN TIM6_DAC_IRQn 0 */

 

/* USER CODE END TIM6_DAC_IRQn 0 */

HAL_TIM_IRQHandler(&htim6);

/* USER CODE BEGIN TIM6_DAC_IRQn 1 */

 

/* USER CODE END TIM6_DAC_IRQn 1 */

}