cancel
Showing results for 
Search instead for 
Did you mean: 

Break interrupt keeps firing

TJO
Associate

Hi all

I have some problem using the Break interrupts (BK1 and BK2). When activated it keeps firing the break interrupt handler: TIM1_BRK_IRQHandler

We have measured the BK1 and BK2 signals and the states are as they scould be when activayted/deactivated and there are no noise on the lines.

The BK1 and BK2 is setup in the Timer1 with correct polarity etc.

TJO_0-1710420693830.png

The PWM's are stopped when activated, but the interrupts handler keeps getting called!

Did I miss something in the handler?

 

 

 void TIM1_BRK_IRQHandler(void)
 {
   // Reset Master Output Enable on motor timer - aka Coast
   htim1.Instance->BDTR &= ~(TIM_BDTR_MOE);
   htim1.Instance->SR &= ~(TIM_SR_BIF);
   Beef::Pal::Stm32h7xx::MotorIsr::ExecuteBreakInterruptHandler();
   HAL_TIM_IRQHandler(&htim1);
 }  

 

 

It is a STM32H730

Any idea what causijng this or is it just the way Break inputs are working?

I could disable interrupts in the handler and reactivate it when starting the PWM again`?

 

Thomasa

3 REPLIES 3

Which STM32?

waclawekjan_0-1710423805074.png

JW

PS. Not the source of  issue you've described, but don't use RMW to clear TIMx_SR flags.

TJO
Associate

Hi 

Sorry, I forgot the type. It is a STM32H730.

 

Thomas

Essentially the same note applies:

waclawekjan_0-1710426779517.png

So the question is, is the break source persistent? If yes, disable break interrupt in TIMx_DIER and reenable it only after the break source has been cleared.

JW