Inflearn brand logo image
Inflearn brand logo image
Inflearn brand logo image
Hardware

/

Embedded IoT

STM32 PWM Implementation

This tutorial explains how to implement PWM using STM32 MCU.

(5.0) 2 reviews

69 learners

  • ihil
stm32
MCU
pwm
stm32cubeide

What you will learn!

  • PWM implementation using STM32 MCU

  • STM32 MCU program implementation

Converting an analog signal into a digital signal?
If you're curious, learn why! 🤗

PWM?

PWM stands for Pulse Width Modulation. It modulates the width of a pulse, and is used to generate and change analog signals using digital signals. PWM is widely used for control purposes, such as motor control and LED brightness control.

Generate PWM signals for your purposes,
Shall we start together? 🦾

The concept of PWM is quite simple. However, the method of implementing PWM varies depending on the MCU. This lecture will teach you how to implement PWM on ST's STM32 MCU and how to implement PWM for various purposes.

This tutorial explains how to implement PWM with the STM32F411. It covers generating and analyzing PWM signals using the NUCLEO-F411RE development board provided by ST. A Windows development program is provided, allowing you to modify PWM properties (frequency, pulse width, dead time, alignment mode, etc.) and analyze the PWM. The compiler tool used is STM32CubeIDE v1.9.0.

💾 Please check before taking the class!

  • This lecture is a text lecture in PDF format and does not provide separate videos.
  • The lecture will be held on the lab board NUCLEO-F411RE .
  • We use STMCubeIDE v1.9.0 , provided free of charge by ST. Please install it before taking the course.

Lecture Features ✨

#1.
Even if this is your first time with ST MCU,
It's easy to follow

This book provides detailed explanations, from project creation to source file analysis, so even beginners to ST MCUs can easily follow along. All source code explained in the lectures is provided. We also provide the source code for the Windows development program. We hope this book will be of great help to those using PWM.

#2.
Difficult to learn easily
You can learn knowledge

This lecture details how to generate PWM signals on ST's STM32 MCU. It explains the relationships between the signals of each PWM when generating multiple PWMs and which modes to use to configure the signal for your specific needs. You can use the provided Windows debugging program to generate and test various PWM signals.


What you'll learn 📚

1️⃣

PWM signal
Creation and Analysis

2️⃣

PWM property analysis
(frequency, pulse width, etc.)

3️⃣

PWM signal
Relationships and Modes

Detailed Curriculum (Table of Contents)
  1. outline (3)
  2. HW configuration (4)
    1. FW Download Pin Map (5)
    2. Power pin map (5)
    3. UART pinmap (5)
    4. Download the program (6)
      1. ST-LINK FW Update (6)
      2. Board connection (7)
  3. PWM (8)
    1. Channel configuration (8)
    2. Frequency setting (10)
    3. Dead Time Setting (11)
    4. Align Mode (13)
  4. Device Configuration (14)
    1. Create a project (14)
    2. Configuration (16)
    3. SYS, RCC (17)
    4. Clock Configuration (18)
    5. PWM Setting – 1 (TIM1) (19)
    6. PWM Setting – 2 (TIM2) (22)
    7. UART settings (25)
  5. Code implementation (26)
    1. printf() implementation (27)
    2. UART receive ISR implementation (30)
    3. Comm communication implementation (32)
      1. communication protocol (32)
      2. Source Analysis (comm_task.c) (32)
    4. ax_pwm1 implementation (35)
      1. Source Analysis (ax_pwm1.c) (36)
    5. ax_pwm2 implementation (38)
    6. Modify main.c (39)
  6. Check results (40)
    1. PWM output pin map (40)
    2. WinIDT (41)
    3. Waveform measurement (43)
      1. Edge Aligned Mode waveform (44)
      2. Dead Time Waveform (49)
      3. Center Aligned Mode waveform (53)
  7. PWM application (55)
    1. Phase control (55)
    2. TIM1, TIM8 synchronization (59)
      1. Pinmap (60)
      2. TIM1, TIM8 settings (61)
      3. Check the program and waveform (62)
  8. References (66)
  9. Revision History (67)


Expected Questions Q&A 💬

Q. Is there anything I need to prepare to attend the lecture?

The lecture will be conducted on the NUCLEO-F411RE board. If you haven't already done so, please review the content first and then purchase the board later to test it on your own.

Q. What program tools do you use?

We use STMCubeIDE v1.9.0, provided free of charge by ST. Please install it before attending the course.


Introducing the Knowledge Sharer ✒️

I've worked as a developer for over 20 years at both large and small companies, and I currently run a small business. I've developed an ISP (Image Signal Processing) ASIC for CCTV, and I've developed numerous FPGA-based products, including OLED inspection equipment and DAQ (Data Acquisition System). Beyond FPGAs, I have extensive experience in software development (STM32, PIC32, AVR, ATMEGA, etc.), circuit design, and Windows programming.


Recommended for
these people

Who is this course right for?

  • Anyone interested in STM32 MCU

  • For those who want to implement PWM

Need to know before starting?

  • C language

Hello
This is

1,647

Learners

66

Reviews

123

Answers

4.8

Rating

19

Courses

저는 지난 20여년 동안 대기업, 중소기업에서 개발자로 일해왔고

현재는 작은 기업의 대표로 있습니다.

주요 경력사항은

  • Verilog HDL을 이용한 FPGA 설계

    • CCTV용 ISP ASIC 개발 (약 10년)

    • OLED Display 검사장비 개발 (약 3년)

    • FPGA를 이용한 장비 개발

  • MCU FW

    • STM32

    • PIC32

    • AVR, ATMEGA

    • DSP (TI)

  • Windows Application Program

    • Visual Studio MFC, C++

입니다.

Curriculum

All

67 lectures

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

All

2 reviews

5.0

2 reviews

  • neulha님의 프로필 이미지
    neulha

    Reviews 12

    Average Rating 5.0

    5

    100% enrolled

    Cảm ơn bạn vì tài liệu hay

    • ihil
      Instructor

      Cảm ơn bạn rất nhiều vì đánh giá đầu tiên của bạn. Tôi hy vọng bạn thấy thông tin này hữu ích.

  • pzzzzz6138님의 프로필 이미지
    pzzzzz6138

    Reviews 1

    Average Rating 5.0

    5

    100% enrolled

    Xin chào. Mình hỏi một câu vì mình không có kiến ​​thức cơ bản. Bạn nói rằng bạn không phải mua nó nếu bạn sử dụng ST Link nội bộ. Tôi có thể nói rằng bạn không phải mua nó nếu bạn theo dõi bản PDF không?!

    • ihil
      Instructor

      Đúng. Nếu bạn làm theo bài giảng, bạn không cần nó. Vì tôi tự phát triển hw nên tôi sử dụng một liên kết bên ngoài riêng biệt.

$17.60

ihil's other courses

Check out other courses by the instructor!