Skip to main content
XFlas.1
Visitor II
February 13, 2020
Question

STM32F746G stucks in TIM6_DAC_IRQHandler?

  • February 13, 2020
  • 8 replies
  • 3209 views

Hello,

everytime when I try to debug my program it stucks after the HAL_Init() in the main, so it never actually reaches the code provided by me.

As I stepped through the code, I noticed that it gets into a infinite loop where it always calls a function that handles the timer 6 global interrupt, DAC1 and DAC2 underrun error interrupts.

**
 * @brief This function handles TIM6 global interrupt, DAC1 and DAC2 underrun error interrupts.
 */
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 */
}

I already tried to deactivate the global interrupts for the above mentioned in the NVIC configuration, but that's not possible.

I am using the STM32F746G-Discovery Board with CubeIDE 1.2.0 and TouchGFX 4.13.0.

Does anyone have a solution for this problem? I've already looked up several sources, but still got no clue.

Please don't blame me for asking for help with such a (presumably) simple problem, I'm relatively new to STM32's and still in the learning process :\ .

Thanks in advance!

This topic has been closed for replies.

8 replies

waclawek.jan
Super User
February 13, 2020

Single-stepping does not stop everything in the processor, the timer may run and invoke a new interrupt faster than you make one step (let alone step through the whole ISR).

Check the freeze registers in DBGMCU.

JW

q123w123e123qweqwe
Associate III
May 27, 2020

Hi, did you find any solution for this? Because I also have the same problem.

Dann
Visitor II
June 26, 2020

I have same issue. I stoped TIM6 when debug with:

DBGMCU->APB1FZ |= DBGMCU_APB1_FZ_DBG_TIM6_STOP;

but it still stuck in LTDC IRQ handler. Turning off LTDC IRQ handler code generation lead to infinite loop. For now only option to debug code in other task is turning off graphic from TouchGFX. I still have no idea how to debug with graphic on.

GMene.785
Associate II
June 13, 2022

I`m getting the same issue with a H7 microcontroller. Does anyone solved this issue?

Piranha
Principal III
June 13, 2022

Maybe try reading the link given by Jan?

waclawek.jan
Super User
June 14, 2022

If you know then that it's not the same issue, why did you post that it is?

Did you stop TIM6 during debugging using the DBGMCU register?

JW