STM32L431 TIM1 PWM output enters Idle State during debugger halt when DBG_TIM1_STOP is enabled?
Hello,
I am using an STM32L431 and found an interesting behavior with TIM1 PWM output while debugging.
Test conditions:
- MCU: STM32L431
- TIM1 CH2 PWM output
- Debugger: ST-LINK
- Debug halt enabled
- DBGMCU TIM1 freeze enabled (DBG_TIM1_STOP)
Observed behavior:
TIM2:
When the debugger halts the CPU (breakpoint or single-step),
the PWM output keeps its current output state as expected.
TIM1:
When the debugger halts the CPU and TIM1 freeze is enabled,
the PWM output no longer behaves like TIM2.
Additional observations:
1. MOE remains set (MOE = 1).
2. With OSSI = 0:
the output appears to become high-impedance (or disconnected).
3. With OSSI = 1 and OIS2 = 0:
the output becomes Low.
4. With OSSI = 1 and OIS2 = 1:
the output becomes High.
5. If DBG_TIM1_STOP is disabled:
PWM continues running during debug halt.
These results make it appear that TIM1 enters an Idle/Off-State condition during debugger halt and the output level is determined by OSSI/OIS settings.
Questions:
1. Is this expected behavior of TIM1 advanced timers during debug halt?
2. Is TIM1 output intentionally forced into an Idle State when DBG_TIM1_STOP is active?
3. Is this behavior documented somewhere in the reference manual?
4. Why does TIM2 keep its output state while TIM1 appears to switch to an Idle-State-controlled output?
Any explanation would be appreciated.
I checked the STM32L431 errata sheet but could not find any
related limitation regarding TIM1 PWM outputs during debug halt.
Thank you.

