cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 Timer Break Interrupt Callback Function

batuhanky
Associate II

Hi All,

I'm using STM32G4 with TIM1 for motor control. The BKIN hardware protection works correctly - when I pull the BKIN pin (PB10) low, the motor stops, and when high, it runs again with AOE enabled. However, the break interrupt never fires and HAL_TIMEx_BreakCallback is never called. I've verified that TIM1_BRK_TIM15_IRQHandler exists in stm32g4xx_it.c, NVIC is enabled. The break flag never gets set even though BKIN is functioning. What could prevent the break flag from being set while the hardware break feature still works?

I want to print diagnostic using BKIN callback routing but it doesn't work.

I've attached IOC timer configurations.

Best regards

image_2025-12-01_225352148.pngimage_2025-12-01_225402390.pngimage_2025-12-01_225411569.pngimage_2025-12-01_225426620.png

1 REPLY 1
TDK
Super User

Does a breakpoint in TIM1_BRK_TIM15_IRQHandler ever get hit?

 

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