 Hi, this is Troy with STMicroelectronics. In this video, I'm going to take you through an example project that demonstrates the break input functionality of the STM32 Advanced Timers. The objective of this video is to show a basic example of how to use the Advanced Timer's break input functionality, and to also give a general overview of its features. It is most commonly used in motor control applications, where the break input pin is connected to an error signal coming from the power switch gate driver. When the break input is activated, all the PWM outputs on the timer will shut down. For the lab, we will be using an STM32-8745 Nucleo board, a micro USB cable for programming and powering the board, and an oscilloscope to measure the results. There will be a link in the video description to a zip file that contains all relevant materials for the project. The only software tool needed is STM32 Cube IDE. Break input is only available on the Advanced Motor Control Timers, which are Timer 1 and Timer 8. This example project will use Timer 1. The break function can be activated from multiple sources. There are two digital GPIO inputs that activate the break when the input is logic high. You can also use the outputs of Comparator 1 and 2 to activate the break. This is useful because the comparators have a programmable threshold, allowing you to set the voltage that you want the break to happen at. The digital filter for Sigma Delta modulator can also be used to activate the break on an analog watchdog or short circuit event. This is useful for monitoring a voltage or current with an external Sigma Delta modulator. Lastly, the break can be activated through system events or software. These refer to the MCU reference manual for more information on break input sources. For this project, we will use a basic GPIO input to activate the break. With the background knowledge out of the way, let's generate the project. First launch Cube IDE and select your workspace. Once Cube IDE is launched, go to File, New, STM32 Project. In the target selection window, go to the Board Selector tab and navigate to the STM32H745ZIQ nuclear board. Select Next and give a name to your project. Select Finish and initialize all peripherals in their default mode. Once the device configuration tool is opened, under the Timers dropdown, select Timer 1. Select the Cortex M7 runtime context and enable complementary PWM generation on channel 1. Now activate the break input. In the configuration, by default, the break source will be set to digital input. Now under PWM generation channel 1, set the pulse to 32,768. That's it for the configuration. Now go to File and Save and you will be prompted to generate code. Select Yes. As of Cube IDE 1.6 and Cube MX 6.2, if you are using a dual core MCU, you will need to add the GPIO alternate function assignment code. For all other MCUs, you will only need to start the complementary PWMs. Since we're using a dual core MCU, we need the code for both the GPIO alternate function assignment and the code to start the complementary PWM outputs. First, make sure you're in the main.c for the Cortex M7 project. Now open the text file found in the zip in the video description and copy the code found here. Paste this code in the User Code Begin 2 section. Once the code is pasted in, we need to build the projects. First, right-click the CM7 project and select Build Project. When the CM7 project is done building, we can build the CM4 project. Now that both projects are built, we can upload the CM4 project to the microcontroller. Right-click the project, go to Run As, SCM32 Cortex M application. Select OK. Once the CM4 project is running on the microcontroller, we can debug the CM7 project. Right-click the CM7 project, go to Debug As, SCM32 Cortex M application. Select OK. Switch to the Debug perspective and with the debugger attached, click Resume. With the project running, you can connect your oscilloscope or logic analyzer to these three GPIO pins. The complementary PWMs will be running. Now if you connect the break and put pin to 3.3 volts, the PWM outputs will stop. That's all for this video. Thanks for watching.