cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746G stucks in TIM6_DAC_IRQHandler?

XFlas.1
Associate

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!

8 REPLIES 8

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

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

Dann
Associate II

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.

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

Maybe try reading the link given by Jan?

If you read the link you would know it says that for H7 uc family does not have this issuel, but i`m getting it on a H7. Just trying to check the updates, stay fresh Piranha!

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