|
Technical Support Support Resources Product Information | STM32 PWM (1) ExampleThe STM32 PWM_1 example program shows how to configure and use the timer TIM4 of STMicroelectronics STM32F103xx microcontroller to generate pulse-width modulation.
TIM4 is configured to tick every second. Channel 3, connected to PB8, has a duty cicle of 50% and channel 4, connected tp PB9, has a duty cicle of 25%. LEDs PB8, PB9 are lit during the channel's duty cicle.
The configuration of the clocks and the timer TIM4 is done using the Configuration Wizard in file STM32_Init.c.
Two µVision targets are available: - Simulator where the program runs in the software simulator.
- MCBSTM32 where the program runs from internal Flash located on the microcontroller.
The example is tesed with the Keil Evaluation Board MCBSTM32. STM32_PWM_1.ZIP (30K) Thursday, February 12, 2009 Estimated File Download Time: < 10 Seconds: 56Kb Modem < 10 Seconds: 128Kb ISDN < 10 Seconds: T1/Broadband |
|