Basic PWM

<< Click to Display Table of Contents >>

Navigation:  STM32F4 Target > Demos > Standard Peripherals Demos > TIM >

Basic PWM

Previous pageReturn to chapter overviewNext page

Demo File: stm32f4_basicpwm_demo.mdl

basicpwmdemo_activehigh

 

basicpwm_hloptions

 

Description

This example demonstrates how to use the Basic PWM Block to configure Timer 4 generate Active High PWM signals with 0.02 seconds period.

4 PWM signals are generated as follows.

Channel 1 = D12 (100% Duty Cycle)
Channel 2 = D13 (75% Duty Cycle)
Channel 3 = D14 (25% Duty Cycle)
Channel 4 = D15 (0% Duty Cycle)

What should be happening?

4 PWM Signals should be generated as shown below.

basicpwmdemo_activehigh_output_zoom80

Active Low Example

System model

basicpwmdemo_activelowsystem

Outputs

basicpwmdemo_activelow_output_zoom80