This application user manual provides a short description of how to use the Timer 2 peripheral (TIM2) on the STM8S-DISCOVERY development board to generate three PWM signals. Even though the STM8S-DISCOVERY is built around an STM8S105C6T6, it allows evaluation of the main features of all the STM8S MCUs.
This document explains how to configure the Timer 2 (TIM2) peripheral of the STM8S microcontroller, specifically on the STM8S-DISCOVERY evaluation board, to generate Pulse Width Modulation (PWM) signals. It details the hardware requirements and the underlying principle of PWM generation using the TIM2 counter.
An oscilloscope is needed as an external resource.
The default frequency for all three channels is 2 KHz.
Channel 1 generates a PWM signal with a duty cycle of 50%.