Break interrupt keeps firing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-14 5:54 AM - edited ‎2024-03-14 6:47 AM
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.
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
- Labels:
-
STM32 Motor Control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-14 6:44 AM
Which STM32?
JW
PS. Not the source of issue you've described, but don't use RMW to clear TIMx_SR flags.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-14 6:46 AM
Hi
Sorry, I forgot the type. It is a STM32H730.
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-03-14 7:33 AM - edited ‎2024-03-14 7:33 AM
Essentially the same note applies:
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
