MG32F10x Standard Peripherals Firmware Library
|
*************** (C) COPYRIGHT 2020 - 2023 megawin Technology *************** * @file TIM/TIM_OCActive/readme.txt * @author megawin Application Team * @version V0.1.10 * @date 05-January-2023 * @brief Description of the TIM_OCActive example. ****************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, MEGAWIN SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM * THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. ******************************************************************************
This example shows how to configure the TIM peripheral to generate four different signals with four different delays.
The system clock works at 96Mhz and is generated through PLL configuration. The PLL clock source is an external 8Mhz crystal oscillator. The frequency division ratio of APB1 is 1, and the frequency division ratio of APB2 is 1.
TIM1CLK frequency is set to SystemCoreClock (Hz),and the objective is to get TIM3 counter clock at 1MHz so the Prescaler is computed as following:
TIM/TIM_OCActive/TIM_OCActive.uvprojx MDK5 project file
In order to make the program work, you must do the following :
Run the example