{"id":1730,"date":"2026-07-13T00:37:27","date_gmt":"2026-07-13T00:37:27","guid":{"rendered":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/"},"modified":"2026-07-13T01:39:16","modified_gmt":"2026-07-13T01:39:16","slug":"stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring","status":"publish","type":"post","link":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","title":{"rendered":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring"},"content":{"rendered":"<p>Every STM32 has hardware timers capable of generating PWM directly in silicon, with no CPU cycles spent toggling a pin. That makes it the right tool for motor speed control, LED dimming, and servo signals. This guide walks through generating a PWM signal on STM32 and wiring it through an H-bridge driver to control a DC motor.<\/p>\n<h2>How Timer PWM Works<\/h2>\n<p>An STM32 timer counts up from zero to a value called the auto-reload register (ARR), then resets and repeats. A second register, the capture-compare register (CCR), sets the point in that count where the output pin flips from high to low. The ratio of CCR to ARR is your duty cycle, and the timer&#8217;s clock frequency divided by ARR gives you the PWM frequency. For motor control, 20kHz is a common choice \u2014 high enough to be inaudible, low enough to keep switching losses low on most H-bridge ICs.<\/p>\n<h2>Configuring the Timer in STM32CubeIDE<\/h2>\n<p>In CubeMX, set the timer channel to PWM Generation mode, then calculate your prescaler and ARR to hit the target frequency:<\/p>\n<pre><code>PWM Frequency = Timer Clock \/ ((PSC + 1) * (ARR + 1))\n\n\/\/ Example: 168MHz timer clock, targeting 20kHz\n\/\/ PSC = 0, ARR = 8399  \u2192  168,000,000 \/ 8400 = 20,000 Hz\n<\/code><\/pre>\n<h2>Starting the PWM and Setting Duty Cycle<\/h2>\n<pre><code>HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);\n\n\/\/ Set duty cycle as a percentage of ARR\nvoid set_duty_cycle(uint8_t percent) {\n  uint32_t arr = __HAL_TIM_GET_AUTORELOAD(&htim3);\n  uint32_t ccr = (arr * percent) \/ 100;\n  __HAL_TIM_SET_COMPARE(&htim3, TIM_CHANNEL_1, ccr);\n}\n<\/code><\/pre>\n<h2>Wiring to an H-Bridge<\/h2>\n<p>A single PWM pin controls speed, but you need an H-bridge to handle the current a motor draws and to reverse direction. With a common driver like the DRV8833 or L298N, the PWM output goes to one input pin while a second GPIO sets direction:<\/p>\n<ul>\n<li><strong>IN1 = PWM signal, IN2 = LOW<\/strong> \u2014 motor spins forward, speed set by duty cycle<\/li>\n<li><strong>IN1 = LOW, IN2 = PWM signal<\/strong> \u2014 motor spins in reverse<\/li>\n<li><strong>IN1 = LOW, IN2 = LOW<\/strong> \u2014 motor coasts to a stop<\/li>\n<li><strong>IN1 = HIGH, IN2 = HIGH<\/strong> \u2014 active braking, on drivers that support it<\/li>\n<\/ul>\n<p>Always power the motor from a separate supply rail from the STM32&#8217;s logic supply, sharing only ground, and add a flyback diode or use a driver IC with one already built in \u2014 brushed DC motors generate voltage spikes when the field collapses that can damage GPIO pins if driven directly.<\/p>\n<h2>Direction Control in Code<\/h2>\n<pre><code>void motor_forward(uint8_t speed_percent) {\n  HAL_GPIO_WritePin(IN2_GPIO_Port, IN2_Pin, GPIO_PIN_RESET);\n  set_duty_cycle(speed_percent);\n}\n\nvoid motor_reverse(uint8_t speed_percent) {\n  HAL_GPIO_WritePin(IN1_GPIO_Port, IN1_Pin, GPIO_PIN_RESET);\n  set_duty_cycle(speed_percent);\n}\n<\/code><\/pre>\n<h2>Ramping Instead of Stepping<\/h2>\n<p>Jumping straight to full duty cycle draws a large inrush current and can brown out a poorly decoupled supply. Ramp the duty cycle up over 100\u2013200ms in a timer interrupt or a simple loop with delays, especially on boards where the motor driver shares a supply rail with other sensitive electronics.<\/p>\n<h2>Next Steps<\/h2>\n<p>Once open-loop speed control works, the natural next step is closing the loop with an encoder and a PID controller so the motor holds a target RPM regardless of load \u2014 a good follow-up project once this foundation is solid.<\/p>","protected":false},"excerpt":{"rendered":"<p>Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor&#8217;s speed and direction.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[60,62],"tags":[],"class_list":["post-1730","post","type-post","status-publish","format-standard","hentry","category-stm32f4","category-tutorials-guides"],"blocksy_meta":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor&#039;s speed and direction.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Vincent Nyanzu Kwofie\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"fr_FR\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Nvixeon - Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon\" \/>\n\t\t<meta property=\"og:description\" content=\"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor&#039;s speed and direction.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-13T00:37:27+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-13T01:39:16+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor&#039;s speed and direction.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#blogposting\",\"name\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon\",\"headline\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\",\"author\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/Nvixeon-Logo-Black-With-outline-Transparent.webp\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#articleImage\",\"width\":1536,\"height\":1024},\"datePublished\":\"2026-07-13T00:37:27+00:00\",\"dateModified\":\"2026-07-13T01:39:16+00:00\",\"inLanguage\":\"fr-FR\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#webpage\"},\"articleSection\":\"STM32F4, Tutorials &amp; Guides\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/category\\\/stm32f4\\\/#listItem\",\"name\":\"STM32F4\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/category\\\/stm32f4\\\/#listItem\",\"position\":2,\"name\":\"STM32F4\",\"item\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/category\\\/stm32f4\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#listItem\",\"name\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#listItem\",\"position\":3,\"name\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/category\\\/stm32f4\\\/#listItem\",\"name\":\"STM32F4\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#organization\",\"name\":\"Nvixeon\",\"description\":\"Custom STM32 Development Boards \\u2014 Built in Ghana, Shipped Worldwide\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/Nvixeon-Logo-Black-With-outline-Transparent.webp\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#organizationLogo\",\"width\":1536,\"height\":1024},\"image\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#organizationLogo\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/#author\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/\",\"name\":\"Vincent Nyanzu Kwofie\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Vincent Nyanzu Kwofie\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#webpage\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\",\"name\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon\",\"description\":\"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor's speed and direction.\",\"inLanguage\":\"fr-FR\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/#author\"},\"datePublished\":\"2026-07-13T00:37:27+00:00\",\"dateModified\":\"2026-07-13T01:39:16+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#website\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/\",\"name\":\"Nvixeon\",\"description\":\"Custom STM32 Development Boards \\u2014 Built in Ghana, Shipped Worldwide\",\"inLanguage\":\"fr-FR\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon","description":"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor's speed and direction.","canonical_url":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#blogposting","name":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon","headline":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring","author":{"@id":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/#author"},"publisher":{"@id":"https:\/\/www.nvixeon.com\/fr\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-Transparent.webp","@id":"https:\/\/www.nvixeon.com\/fr\/#articleImage","width":1536,"height":1024},"datePublished":"2026-07-13T00:37:27+00:00","dateModified":"2026-07-13T01:39:16+00:00","inLanguage":"fr-FR","mainEntityOfPage":{"@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#webpage"},"isPartOf":{"@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#webpage"},"articleSection":"STM32F4, Tutorials &amp; Guides"},{"@type":"BreadcrumbList","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr#listItem","position":1,"name":"Home","item":"https:\/\/www.nvixeon.com\/fr","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/#listItem","name":"STM32F4"}},{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/#listItem","position":2,"name":"STM32F4","item":"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#listItem","name":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#listItem","position":3,"name":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring","previousItem":{"@type":"ListItem","@id":"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/#listItem","name":"STM32F4"}}]},{"@type":"Organization","@id":"https:\/\/www.nvixeon.com\/fr\/#organization","name":"Nvixeon","description":"Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide","url":"https:\/\/www.nvixeon.com\/fr\/","logo":{"@type":"ImageObject","url":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-Transparent.webp","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#organizationLogo","width":1536,"height":1024},"image":{"@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#organizationLogo"}},{"@type":"Person","@id":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/#author","url":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/","name":"Vincent Nyanzu Kwofie","image":{"@type":"ImageObject","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g","width":96,"height":96,"caption":"Vincent Nyanzu Kwofie"}},{"@type":"WebPage","@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#webpage","url":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","name":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon","description":"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor's speed and direction.","inLanguage":"fr-FR","isPartOf":{"@id":"https:\/\/www.nvixeon.com\/fr\/#website"},"breadcrumb":{"@id":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#breadcrumblist"},"author":{"@id":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/#author"},"creator":{"@id":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/#author"},"datePublished":"2026-07-13T00:37:27+00:00","dateModified":"2026-07-13T01:39:16+00:00"},{"@type":"WebSite","@id":"https:\/\/www.nvixeon.com\/fr\/#website","url":"https:\/\/www.nvixeon.com\/fr\/","name":"Nvixeon","description":"Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide","inLanguage":"fr-FR","publisher":{"@id":"https:\/\/www.nvixeon.com\/fr\/#organization"}}]},"og:locale":"fr_FR","og:site_name":"Nvixeon - Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide","og:type":"article","og:title":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon","og:description":"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor's speed and direction.","og:url":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","og:image":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp","og:image:secure_url":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp","article:published_time":"2026-07-13T00:37:27+00:00","article:modified_time":"2026-07-13T01:39:16+00:00","twitter:card":"summary_large_image","twitter:title":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring - Nvixeon","twitter:description":"Learn how STM32 timers generate PWM signals, how to configure a channel with STM32CubeIDE, and how to wire that signal through an H-bridge to control a DC motor's speed and direction.","twitter:image":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/Nvixeon-Logo-Black-With-outline-4-Transparent.webp"},"aioseo_meta_data":{"post_id":"1730","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-07-14 16:35:36","updated":"2026-07-14 16:35:36"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nvixeon.com\/fr\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/\" title=\"STM32F4\">STM32F4<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSTM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.nvixeon.com\/fr"},{"label":"STM32F4","link":"https:\/\/www.nvixeon.com\/fr\/category\/stm32f4\/"},{"label":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring","link":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/"}],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>STM32 PWM Motor Control Guide: Timers &amp; H-Bridge Wiring<\/title>\n<meta name=\"description\" content=\"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STM32 PWM Motor Control Guide: Timers &amp; H-Bridge Wiring\" \/>\n<meta property=\"og:description\" content=\"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/\" \/>\n<meta property=\"og:site_name\" content=\"Nvixeon\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-13T00:37:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-13T01:39:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/14578c91-110c-4615-b54e-fb52d8ee3a41-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1402\" \/>\n\t<meta property=\"og:image:height\" content=\"1122\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Vincent Nyanzu Kwofie\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u00c9crit par\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vincent Nyanzu Kwofie\" \/>\n\t<meta name=\"twitter:label2\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\"},\"author\":{\"name\":\"Vincent Nyanzu Kwofie\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#\\\/schema\\\/person\\\/1e56786402d05eb5a411bc0e203bd6b7\"},\"headline\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\",\"datePublished\":\"2026-07-13T00:37:27+00:00\",\"dateModified\":\"2026-07-13T01:39:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\"},\"wordCount\":438,\"publisher\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#organization\"},\"articleSection\":[\"STM32F4\",\"Tutorials &amp; Guides\"],\"inLanguage\":\"fr-FR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\",\"name\":\"STM32 PWM Motor Control Guide: Timers & H-Bridge Wiring\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#website\"},\"datePublished\":\"2026-07-13T00:37:27+00:00\",\"dateModified\":\"2026-07-13T01:39:16+00:00\",\"description\":\"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.nvixeon.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#website\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/\",\"name\":\"Nvixeon\",\"description\":\"Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.nvixeon.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#organization\",\"name\":\"Nvixeon\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/cropped-Nvixeon_Icon-12.webp\",\"contentUrl\":\"https:\\\/\\\/www.nvixeon.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/cropped-Nvixeon_Icon-12.webp\",\"width\":512,\"height\":512,\"caption\":\"Nvixeon\"},\"image\":{\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.nvixeon.com\\\/#\\\/schema\\\/person\\\/1e56786402d05eb5a411bc0e203bd6b7\",\"name\":\"Vincent Nyanzu Kwofie\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g\",\"caption\":\"Vincent Nyanzu Kwofie\"},\"sameAs\":[\"http:\\\/\\\/nvixeon.com\"],\"url\":\"https:\\\/\\\/www.nvixeon.com\\\/fr\\\/author\\\/vincentkwofie123gmail-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STM32 PWM Motor Control Guide: Timers & H-Bridge Wiring","description":"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","og_locale":"fr_FR","og_type":"article","og_title":"STM32 PWM Motor Control Guide: Timers & H-Bridge Wiring","og_description":"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.","og_url":"https:\/\/www.nvixeon.com\/fr\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","og_site_name":"Nvixeon","article_published_time":"2026-07-13T00:37:27+00:00","article_modified_time":"2026-07-13T01:39:16+00:00","og_image":[{"width":1402,"height":1122,"url":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/14578c91-110c-4615-b54e-fb52d8ee3a41-1.webp","type":"image\/webp"}],"author":"Vincent Nyanzu Kwofie","twitter_card":"summary_large_image","twitter_misc":{"\u00c9crit par":"Vincent Nyanzu Kwofie","Dur\u00e9e de lecture estim\u00e9e":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#article","isPartOf":{"@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/"},"author":{"name":"Vincent Nyanzu Kwofie","@id":"https:\/\/www.nvixeon.com\/#\/schema\/person\/1e56786402d05eb5a411bc0e203bd6b7"},"headline":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring","datePublished":"2026-07-13T00:37:27+00:00","dateModified":"2026-07-13T01:39:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/"},"wordCount":438,"publisher":{"@id":"https:\/\/www.nvixeon.com\/#organization"},"articleSection":["STM32F4","Tutorials &amp; Guides"],"inLanguage":"fr-FR"},{"@type":"WebPage","@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","url":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/","name":"STM32 PWM Motor Control Guide: Timers & H-Bridge Wiring","isPartOf":{"@id":"https:\/\/www.nvixeon.com\/#website"},"datePublished":"2026-07-13T00:37:27+00:00","dateModified":"2026-07-13T01:39:16+00:00","description":"A practical guide to generating PWM on STM32 timers and wiring it through an H-bridge for DC motor speed and direction control.","breadcrumb":{"@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.nvixeon.com\/stm32-pwm-motor-control-guide-timers-duty-cycle-and-h-bridge-wiring\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.nvixeon.com\/"},{"@type":"ListItem","position":2,"name":"STM32 PWM Motor Control Guide: Timers, Duty Cycle, and H-Bridge Wiring"}]},{"@type":"WebSite","@id":"https:\/\/www.nvixeon.com\/#website","url":"https:\/\/www.nvixeon.com\/","name":"Nvixeon","description":"Custom STM32 Development Boards \u2014 Built in Ghana, Shipped Worldwide","publisher":{"@id":"https:\/\/www.nvixeon.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.nvixeon.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/www.nvixeon.com\/#organization","name":"Nvixeon","url":"https:\/\/www.nvixeon.com\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/www.nvixeon.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/cropped-Nvixeon_Icon-12.webp","contentUrl":"https:\/\/www.nvixeon.com\/wp-content\/uploads\/2026\/06\/cropped-Nvixeon_Icon-12.webp","width":512,"height":512,"caption":"Nvixeon"},"image":{"@id":"https:\/\/www.nvixeon.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.nvixeon.com\/#\/schema\/person\/1e56786402d05eb5a411bc0e203bd6b7","name":"Vincent Nyanzu Kwofie","image":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/secure.gravatar.com\/avatar\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e656f896e9c830369e61ccecbdefb5e9ffbe544962a13983f2ae009448338ce5?s=96&d=mm&r=g","caption":"Vincent Nyanzu Kwofie"},"sameAs":["http:\/\/nvixeon.com"],"url":"https:\/\/www.nvixeon.com\/fr\/author\/vincentkwofie123gmail-com\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/posts\/1730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/comments?post=1730"}],"version-history":[{"count":1,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/posts\/1730\/revisions"}],"predecessor-version":[{"id":1739,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/posts\/1730\/revisions\/1739"}],"wp:attachment":[{"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/media?parent=1730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/categories?post=1730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nvixeon.com\/fr\/wp-json\/wp\/v2\/tags?post=1730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}