cancel
Showing results for 
Search instead for 
Did you mean: 

Break at IS_TIM_SLAVE_INSTANCE when debugging

TDele.1
Associate III

Hello,

I've been trying to program a GUI application using Touch GFX with a custom board including a STM32F469II. Recently however, the program has begun to act weird when I try to debug it and fails before I have to restart it manually. Here what I could find concerning this issue :

  • When I try to debug it, it enters HAL_Init(); and goes to the line 478 of the file "stm32f4xx_hal_tim.c" :

 if (IS_TIM_SLAVE_INSTANCE(htim->Instance))

htim is TIM6 here which I put as the timebase source in the SYS menu in CubeMX (the debug mode is Serial Wire). It then stops and an error message is shown : "Break at address "0x0" with no debug information available, or outside of program code.". I'm using CubeIDE by the way.

  • If now I hard reset the board when in debug mode before moving from HAL_init(), it will launch to program and the application is correctly print on my screen and I even can put breakpoint in the GUI process (as an exemple, when the screen is touched) although any breakpoint before that will be missed.
  • When I run the program now, nothing will first happend (no LED brighting up at startup and no screen) up until I hard reset the board and then everything will work as expected.
  • I tried making an other project which only lights up a LED and with the same debug parameters and the program does not need a hard reset to work.

Has anybody experienced a similar issue and if so, how can I fix this issue ?

Thanks in advance,

Tristan

3 REPLIES 3
TDK
Guru

There's nothing special about that line.

https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c#L478

The line before is this:

  /* Enable the TIM Update interrupt */
  __HAL_TIM_ENABLE_IT(htim, TIM_IT_UPDATE);

My guess is the program is stuck in an interrupt which consumes all of the cpu and doesn't let the main thread progress.

If you feel a post has answered your question, please click "Accept as Solution".
TDele.1
Associate III

Thank you for the input,

I've disable all the interrupts I could from CubeMX and the same problem is still showing. I do not know how to prove that an interrupt is the cause of this issue so if you know of a way to prove this I'm a taker.

Tristan

In debug, let it run and then press pause. Usually it will show where it is in the IDE but you can also examine the PC register and map that to a location in your map file to find out.
If it’s in an interrupt, the VECTACTIVE bits will indicate which one.
If you feel a post has answered your question, please click "Accept as Solution".