资源简介
基于STM32的1MHz、1KHz和1Hz同步方波产生
代码片段和文件信息
/******************** (C) COPYRIGHT 2008 STMicroelectronics ********************
* File Name : main.c
* Author : MCD Application Team
* Version : V2.0.1
* Date : 06/13/2008
* Description : Main program body
********************************************************************************
* 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 STMICROELECTRONICS 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.
*******************************************************************************/
/* Includes ------------------------------------------------------------------*/
#include “stm32f10x_lib.h“
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
TIM_TimebaseInitTypeDef TIM_TimebaseStructure;
TIM_ICInitTypeDef TIM_ICInitStructure;
TIM_OCInitTypeDef TIM_OCInitStructure;
ErrorStatus HSEStartUpStatus;
/* Private function prototypes -----------------------------------------------*/
void RCC_Configuration(void);
void NVIC_Configuration(void);
void GPIO_Configuration(void);
/* Private functions ---------------------------------------------------------*/
/*******************************************************************************
* Function Name : main
* Description : Main program
* Input : None
* Output : None
* Return : None
*******************************************************************************/
int main(void)
{
#ifdef DEBUG
debug();
#endif
/* System Clocks Configuration */
RCC_Configuration();
/* NVIC configuration */
NVIC_Configuration();
/* Configure the GPIO ports */
GPIO_Configuration();
/* Timers synchronisation in cascade mode with an external trigger -----
1/TIM2 is configured as Master Timer:
- Toggle Mode is used
- The TIM2 Enable event is used as Trigger Output
2/TIM2 is configured as Slave Timer for an external Trigger connected
to TIM2 TI2 pin (TIM2 CH2 configured as input pin):
- The TIM2 TI2FP2 is used as Trigger Input
- Rising edge is used to start and stop the TIM2: Gated Mode.
3/TIM3 is slave for TIM2 and Master for TIM4
- Toggle Mode is used
- The ITR1(TIM2) is used as input trigger
- Gated mode is used so start and stop of slave counter
are controlled by the Master trigger output sig
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 153904 2009-12-08 22:07 Cascade_Synch\cascade.axf
文件 76080 2009-12-08 22:07 Cascade_Synch\cascade.htm
文件 406 2009-12-08 22:07 Cascade_Synch\cascade.lnp
文件 80318 2009-12-08 22:07 Cascade_Synch\cascade.map
文件 2978 2009-12-08 22:13 Cascade_Synch\cascade.Opt
文件 5292 2009-12-08 22:07 Cascade_Synch\cascade.plg
文件 479 2009-12-05 20:24 Cascade_Synch\cascade.sct
文件 1451 2009-12-08 22:07 Cascade_Synch\cascade.tra
文件 3031 2009-12-08 22:13 Cascade_Synch\cascade.Uv2
文件 10693 2009-12-08 22:07 Cascade_Synch\cascade_1_1_1.dep
....... 2791 2009-12-08 14:58 Cascade_Synch\cascade_Opt.Bak
文件 10696 2009-12-08 21:28 Cascade_Synch\cascade_Target 1.dep
....... 3008 2009-12-05 23:20 Cascade_Synch\cascade_Uv2.Bak
文件 26460 2009-12-05 20:24 Cascade_Synch\cortexm3_macro.lst
文件 2456 2009-12-05 20:24 Cascade_Synch\cortexm3_macro.o
文件 19 2009-12-05 20:51 Cascade_Synch\ExtDll.iex
文件 9871 2009-12-08 22:13 Cascade_Synch\main.c
文件 149590 2009-12-08 22:07 Cascade_Synch\main.crf
文件 1941 2009-12-08 22:07 Cascade_Synch\main.d
文件 173940 2009-12-08 22:07 Cascade_Synch\main.o
文件 154 2009-12-08 22:07 Cascade_Synch\main.__i
文件 3734 2009-05-07 14:50 Cascade_Synch\readme.txt
文件 35249 2009-12-05 20:24 Cascade_Synch\STM32F10x.lst
文件 5160 2009-12-05 20:24 Cascade_Synch\STM32F10x.o
文件 11307 2009-05-07 14:40 Cascade_Synch\STM32F10x.s
文件 6305 2009-05-07 14:50 Cascade_Synch\stm32f10x_conf.h
文件 38476 2009-12-05 20:24 Cascade_Synch\stm32f10x_flash.crf
文件 451 2009-12-05 20:24 Cascade_Synch\stm32f10x_flash.d
文件 44400 2009-12-05 20:24 Cascade_Synch\stm32f10x_flash.o
文件 42711 2009-12-05 20:24 Cascade_Synch\stm32f10x_gpio.crf
............此处省略23个文件信息
相关资源
- STM32库函数DS1302驱动文件
- STM32 DS1302驱动
- STM32 DS18b20
- 基于STM32F103C8T6的手持MP3完整PCB工程文
- STM32L4超低功耗特性概述
- STM32智能家居完整项目代码
- 用STM32的内置Flash做一个超小U盘
- stm32基于轮询方式的串口收发程序
- STM32F030C8T6串口例程
- RFID RC522 stm32f103c8t6 读写demo
- STM32 单位时间内输入方波个数统计函
- 可控硅调节220光程序和原理图.zip
- STM32_ad7705程序
- stm32 控制语音芯片 ISD1760
- STM32F103VCT6设计
- stm32f103c+电机驱动和测速+can+rs485等原
- stm32 uart1 发送接收数据
- 完美解决proteus仿真stm32
- 基于STM32的示波器原理图
- 基于STM32F103的指纹识别程序
- STM32_TCS34725数字颜色传感器
- 基于STM32的MP3播放器设计与实现(提供
- ADS131代码
- STM32F103C8T6脚位分布
- 基于STM32 控制电机程序
- 正点原子STM32F103+MPU6050实现计步器源码
- STM32矩阵键盘HAL库实现,轮询方式,方
- stm32F103的GRBL移植
- stm32f767的cadence的原理图库和pcb库
- STM32_PWM 呼吸灯 MDK 源代码
评论
共有 条评论