🌐
DeepBlue
deepbluembedded.com › home › blog › stm32 complementary pwm & dead-time (code examples)
STM32 Complementary PWM & Dead-Time (Code Examples)
February 7, 2025 - Here is what the dead time looks like in a complementary PWM output signal. In this example project, we’ll configure our STM32 microcontroller’s Timer1 to enable the Complementary PWM output on CH1.
🌐
EmbeddedExpertIO
blog.embeddedexpert.io
STM32 Advanced Timers Part 1: Generating PWM and Complementary Output – EmbeddedExpertIO
The typical output of PWM and it’s complementary shown in figure below: Before we develop the driver, we need to find which pins are connected to TIM1_CH1 and TIM1_CH1N. We can find these information in the datasheet as following: We can find that PA7 and PA8 are for CH1N and CH1 respectively. Also, the alternate function is AF01. On another hand, we need to find which bus TIM1 is connected to: ... Hence, TIM1 is connected to APB2. We start off by including the main stm32 header file:
🌐
DeepBlue
deepbluembedded.com › home › blog › stm32 pwm output example code (pwm generation tutorial)
STM32 PWM Output Example Code (PWM Generation Tutorial)
February 7, 2025 - OCx polarity is software programmable using the CCxP bit in the TIMx_CCER register. It can be programmed as active high or active low. For applications where you need to generate complementary PWM signals, this option will be suitable for you.
🌐
Mbed
os.mbed.com › questions › 6723 › How-do-you-generate-complementary-PWM-Ou
How do you generate complementary PWM Outputs? - Question | Mbed
In the STM32CubeF4 package you will find many examples using Timers. I see that there is one example using timer complementary signals. It is based on STM32F4x9I-EVAL board but I think it is easily portable on the STM32F401RE.
🌐
YouTube
youtube.com › watch
Hands-On with STM32 Timers: Complementary Variable Frequency PWM - YouTube
Find out more information: http://bit.ly/AN-4013STM32H745 Reference Manual: http://bit.ly/RM-0399STM32H745 Datasheet: http://bit.ly/STM32H745-datasheetIn thi...
Published   June 22, 2021
🌐
STMicroelectronics Community
community.st.com › t5 › stm32-mcus-products › what-do-i-use-the-complementary-pwm-output › td-p › 359199
What do I use the complementary PWM output? - STMicroelectronics Community
April 13, 2019 - I am using the microcontroller STM32F103C8T6 (Chinese development kit "bluepill") at 72Mhz. To connect two LEDs for test, set 1 TIMER1 PWM channel with complementary output (CH1 and CH1N) on the STM32 Cube MX.
🌐
Ozderya
hasanyavuz.ozderya.net
STM32 PWM Output with Dead Time Using STM32Cube HAL Platform
In this post I describe steps to create a STM32 project for creating complementary PWM outputs with dead time in between. I use STM32CubeMx tool to configure and create a project that is almost ready to compile. I use STM32F4Discovery development kit which has STM32F407 MCU on it.
🌐
STMicroelectronics Community
community.st.com › t5 › stm32-mcus-embedded-software › stm32g4-use-complementary-pwm-output-without-using-the-original › td-p › 602101
Solved: STM32G4 Use complementary PWM output without using... - STMicroelectronics Community
October 26, 2023 - MCU: STM32G491RET6 Due to other pins being unavailable, I am trying to use TIM8_CH3N to generate a PWM output. To test this, I used CubeMx to generate configuration code for me, and only added the line to start PWM: HAL_TIM_PWM_Start(&htim8, TIM_CHANNEL_3); // start pwm generation · To check that the MCU and CubeMx code are good, I also am generating another PWM, on TIM3_CH1. Again, I only added one line to the CubeMx generated code: HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); // start pwm generation TIM3_CH1 PWM works, while TIM8_CH3N does not.
Find elsewhere
🌐
Embedded Lab
embedded-lab.com › blog › stm32-timers › 6
STM32 Timers | Embedded Lab | Page 6
Luckily STM32 advance timers have this feature. In terms of programming, complementary PWM generation is not so much dissimilar to ordinary PWM generation. Each and every setup is same except in the case of complementary PWM, we need to enable complementary channels and setup dead-time setting if needed. In this example only one complementary pair (CH1 and CH1N) of timer 1 is used.
🌐
Arm Community
community.arm.com › developer › tools-software › tools › f › keil-forum › 25928 › stm32-3-complementary-pwm-signals-problem
Challenge Validation
July 17, 2019 - The Arm tools range offers two software development families that provide you with all the necessary tools for every stage of your software development workflow.
🌐
EmbeddedExpertIO
blog.embeddedexpert.io
Getting Started with STM32G0 and STM32CubeIDE: Generate PWM with it’s complementary signal – EmbeddedExpertIO
These signals are often used in ... the complementary signal is low, and vice versa. For example, if the primary PWM signal has a duty cycle of 40%, the complementary signal will have a duty cycle of 60%....
🌐
ControllersTech®
controllerstech.com › home › stm32 tutorials › stm32 timers series › generate pwm output
STM32 PWM Tutorial: Generate PWM with DMA using HAL
Absolutely—but it requires using STM32’s advanced timer features. Timers like TIM1 or TIM8 support complementary outputs, dead-time insertion, and internal synchronization through master/slave and TRGO/ITRx chains.
Published   April 30, 2026
🌐
STMicroelectronics
st.com › resource › en › product_training › STM32WB-WDG_TIMERS-General-Purpose-Timer-GPTIM.pdf pdf
STM32WB-WDG_TIMERS-General-Purpose-Timer- ...
June 1, 2021 - ST is a global high-tech company creating semiconductor technologies for a smarter, greener, and more sustainable future
🌐
Chibios
forum.chibios.org › viewtopic.php
STM32: Timer 1 PWM complementary outputs - ChibiOS Free Embedded RTOS
October 4, 2011 - */ NULL, { {PWM_OUTPUT_ACTIVE_HIGH | PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW, NULL}, /* PWM4, CH1 */ {PWM_OUTPUT_ACTIVE_HIGH | PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW, NULL}, /* PWM4, CH2 */ {PWM_OUTPUT_ACTIVE_HIGH | PWM_COMPLEMENTARY_OUTPUT_ACTIVE_LOW, NULL}, /* PWM4, CH3 */ {PWM_OUTPUT_DISABLED, NULL} }, 0, 0 }; ... Code: Select all palSetPadMode(GPIOA, 8, PAL_MODE_STM32_ALTERNATE_PUSHPULL); palSetPadMode(GPIOA, 9, PAL_MODE_STM32_ALTERNATE_PUSHPULL); palSetPadMode(GPIOA, 10, PAL_MODE_STM32_ALTERNATE_PUSHPULL); palSetPadMode(GPIOB, 13, PAL_MODE_STM32_ALTERNATE_PUSHPULL); palSetPadMode(GPIOB, 14, PAL_
🌐
DeepBlue
deepbluembedded.com › home › blog › stm32 pwm phase shift (timer synchronized) + example code
STM32 PWM Phase Shift (Timer Synchronized) + Example Code
February 7, 2025 - According to the setup we’ve made so far, they’ll still maintain the phase shift relation between each other. The complementary PWM output is just the inverse of each PWM output waveform we already have, with optional dead-time insertion, of course. For further information, check out this STM32 ...
🌐
STMicroelectronics Community
community.st.com › stmicroelectronics community › discussions › product forums › stm32 mcus › stm32 mcus embedded software › stm32g4 use complementary pwm output without using the original pwm output
STM32G4 Use complementary PWM output without using the original PWM output | Community
October 26, 2023 - To check that the MCU and CubeMx code are good, I also am generating another PWM, on TIM3_CH1. Again, I only added one line to the CubeMx generated code: HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1); // start pwm generation TIM3_CH1 PWM works, while ...
🌐
STMicroelectronics
st.com › resource › en › application_note › an4277-using-stm32-device-pwm-shutdown-features-for-motor-control-and-digital-power-conversion-stmicroelectronics.pdf pdf
AN4277 Application note - Using STM32 device PWM shut- ...
January 1, 2023 - generate complementary PWM signals with a dead time insertion for driving power switches in a half-bridge ... 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 ... Table 2 summarizes the break inputs availability. Table 2. Timers and break input availability in STM32 devices