2020-02-13 08:09 AM
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!
2020-02-13 11:55 AM
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
2020-05-26 11:26 PM
Hi, did you find any solution for this? Because I also have the same problem.
2020-06-26 01:50 AM
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.
2020-06-26 07:15 AM
2022-06-13 07:41 AM
I`m getting the same issue with a H7 microcontroller. Does anyone solved this issue?
2022-06-13 11:13 AM
Maybe try reading the link given by Jan?
2022-06-13 05:08 PM
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!
2022-06-13 11:55 PM
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