AN4277 · Application noteHow to use PWM shutdown for motor control and digital power conversion on STM32 MCUs
Download .pdfOpen in the full document

Break function overview

Break function overview

The break function is available in TIM1, TIM8, TIM20, TIM15, TIM16, and TIM17 timers. These timers are able to generate complementary PWM signals with a dead time insertion for driving power switches in a half-bridge topology.

The purpose of the break function is to protect power switches driven by PWM signals generated with these timers. When triggered by a fault, the break circuitry shuts down the PWM outputs and forces them to a predefined safe state.

Table 2 Timers and break input availability in STM32 devices summarizes the break inputs availability.

Table 2. Timers and break input availability in STM32 devices
-TIM1TIM8TIM20TIM15TIM16TIM17
STM32F0BRK-----
BRK_ACTH
STM32F1BRK--BRKBRKBRK
BRK_ACTHBRK_ACTHBRK_ACTHBRK_ACTH

STM32F2
STM32F4

BRKBRK----
BRK_ACTHBRK_ACTH
STM32F3BRKBRKBRKBRKBRKBRK
BRK2BRK2BRK2BRK_ACTHBRK_ACTHBRK_ACTH
BRK_ACTHBRK_ACTHBRK_ACTH---
STM32F7BRKBRK----
BRK2BRK2
BRK_ACTHBRK_ACTH

STM32L4
STM32L5
STM32U5, STM32C5
STM32H7
1
STM32H5
2

BRKBRK-BRKBRKBRK
BRK2BRK2System breakSystem breakSystem break
System breakSystem break---

STM32C0
STM32WB
STM32WL
STM32H7Rx/7Sx

BRK---BRKBRK
BRK2System breakSystem break
System break--
STM32G0, STM32U3BRK--BRKBRKBRK
BRK2System breakSystem breakSystem break
System break---
STM32G4BRKBRKBRKBRKBRKBRK
BRK2BRK2BRK2System breakSystem breakSystem break
System breakSystem breakSystem break---

STM32H503
STM32U0

BRK-----
BRK2
System break
STM32L0BRK-----
-
-

The BRK input can either disable the PWM outputs (inactive state) or force them to a predefined safe state, either active or inactive, after a dead time insertion. This prevents any shoot-through in the half bridge. The BRK2 only disables the PWM outputs (inactive state).

BRK has a higher priority than BRK2. When both protections are triggered, the predefined safe state related to the BRK circuitry overrides the inactive state related to the BRK2 input.

Typically, a permanent magnet 3-phase brushless motor drive uses the protections as follows:

  • The BRK2 input as an overcurrent protection, opening the six switches from the power stage.
  • The BRK input as an overvoltage protection, overriding the overcurrent and closing the three low-side switches to avoid current regeneration to build up the bus voltage and exceed the capacitor-rated voltage.

As an example in STM32F303xB/C/D/E devices, for a dual motor drive, the comparators 1, 2, and 3 can be dedicated to overcurrent monitoring of the three phases of motor 1 (BRK2 input of TIM1). The comparators 4, 5, and 6 can be dedicated to overcurrent monitoring of the three phases of motor 2 (BRK2 input of TIM8), while the comparator 7 is used for overvoltage monitoring (driving BRK inputs of TIM1 and TIM8).

BRK_ACTH input is connected only to internal signals such as CSS and PVD output. On newer devices like STM32U5 or STM32U3, it is marked as tim_sys_brk (system break interconnect) or as internal source but this serves the same purpose. For more details, refer to Break implementation.

The availability of break inputs and the break sources depends on the selected STM32 series.

This is summarized in Table 3 Comparator peripherals availability per STM32 device and in document AN4277_General-information.html#id_61741__entry_fnp_1bj_31c which details the available timers.

Table 3. Comparator peripherals availability per STM32 deviceComparator availability may be limited by the package pin count.
-STM32F0STM32F3STM32L13STM32L04STM32L4STM32L5STM32U5STM32WB, STM32WLSTM32C5STM32U0 STM32G05STM32G4STM32H5STM32H76
STM32F05xxxSTM32F07xxxSTM3209xxxSTM32F303xB/CSTM32F358xCSTM32F303x6/8STM32F328x8STM32F303xD/ESTM32F398xESTM32F302xB/C/D/ESTM32F302x6/8STM32F301x6/8STM32F318x8STM32F334x4/6/8STM32F37xxxSTM32L4STM32L4+STM32U37STM32G051/61STM32G071/81STM32G0B1/CSTM32G4x1STM32G4x3STM32H503
Filter---------DFSDMDFSDMMDF7-----DFSDM
COMP 1XX-XX--XXXXXXXXXXX
COMP 2XXXXXXXXXX8XXXXXX-X
COMP 3-X-X---------XXX--
COMP 4-XXXXXX-------XX--
COMP 5-X-X-----------X--
COMP 6-XXXXXX--------X--
COMP 7-X-X-----------X--
1 Excluding STM32H7Rx/7Sx.
2 Excluding STM32H503.
3 These devices feature comparators, but no advanced timers with break inputs.
4 These devices feature comparators, but no advanced timers with break inputs. STM32L010 value line has no comparators either.
5 STM32G0x0, STM32G031, and STM32G041 have no comparators.
6 Excluding the STM32H7Rx/Sx line.
7 ADF does not feature a break output.
8 STM32L412/L422 does not have COMP2.