STM32F103C8T6资料.zip
大小:21.66MB
价格:19积分
下载量:0
评分:
5.0
上传者:j98022154
更新日期:2025-09-22

STM32F103C8T6最小系统原理图、PCB、EDA向导和测试程序

资源文件列表(大概)

文件名
大小
STM32F103C8T6/
-
STM32F103C8T6/stm32f103.pdf
468.31KB
STM32F103C8T6/stm32f103.SCHLIB
49.5KB
STM32F103C8T6/STM32F103C8T6/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/PCB_Project_4.~(1).SCHLIB.Zip
8.73KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/Sheet1.~(1).SchDoc.Zip
26.56KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/Sheet1.~(3).SchDoc.Zip
22.35KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/Sheet1.~(4).SchDoc.Zip
22.35KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/stm32f103.~(1).PrjPCB.Zip
4.32KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/stm32f103.~(2).PrjPCB.Zip
4.35KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/STM32F103C8T6核心板.~(1).PcbDoc.Zip
2.98MB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/STM32F103C8T6核心板.~(6).PcbDoc.Zip
2.97MB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/History/STM32F103C8T6核心板.~(7).PcbDoc.Zip
2.97MB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Output/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Output/Design Rule Check - STM32F103C8T6核心板.drc
955B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Output/Design Rule Check - STM32F103C8T6核心板.html
9.17KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/PCB_Project_4.SCHLIB
33.5KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Project Logs for stm32f103/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Project Logs for stm32f103/STM32F103C8T6核心板 PCB ECO 2021-4-15 20-41-20.LOG
826B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Project Logs for stm32f103/STM32F103C8T6核心板 PCB ECO 2021-4-15 21-07-39.LOG
826B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Project Logs for stm32f103/STM32F103C8T6核心板 PCB ECO 2021-4-15 21-08-35.LOG
826B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Project Logs for stm32f103/STM32F103C8T6核心板 PCB ECO 2021-4-15 21-25-15.LOG
86B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/Sheet1.SchDoc
196KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/stm32f103.PrjPCB
37.99KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/stm32f103.PrjPCBStructure
297B
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/STM32F103C8T6核心板.PcbDoc
3.38MB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/STM32F103C8T6核心板.PcbDoc.htm
4.47KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/STM32F103C8T6核心板.PcbLib
1.99MB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/__Previews/
-
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/__Previews/Sheet1.SchDocPreview
54.25KB
STM32F103C8T6/STM32F103C8T6/原理图+PCB+库/__Previews/STM32F103C8T6核心板.PcbDocPreview
66.85KB
STM32F103C8T6/STM32F103C8T6核心板.PcbLib
1.99MB
STM32F103C8T6/测试程序/
-
STM32F103C8T6/测试程序/DebugConfig/
-
STM32F103C8T6/测试程序/DebugConfig/Target_1_STM32F103C8_1.0.0.dbgconf
6.79KB
STM32F103C8T6/测试程序/DebugConfig/Target_1_STM32F103VC_1.0.0.dbgconf
6.79KB
STM32F103C8T6/测试程序/Hardware/
-
STM32F103C8T6/测试程序/Hardware/LED.c
902B
STM32F103C8T6/测试程序/Hardware/LED.h
135B
STM32F103C8T6/测试程序/keilkill.bat
399B
STM32F103C8T6/测试程序/Library/
-
STM32F103C8T6/测试程序/Library/misc.c
6.88KB
STM32F103C8T6/测试程序/Library/misc.h
8.77KB
STM32F103C8T6/测试程序/Library/stm32f10x_adc.c
46.09KB
STM32F103C8T6/测试程序/Library/stm32f10x_adc.h
21.18KB
STM32F103C8T6/测试程序/Library/stm32f10x_bkp.c
8.26KB
STM32F103C8T6/测试程序/Library/stm32f10x_bkp.h
7.38KB
STM32F103C8T6/测试程序/Library/stm32f10x_can.c
44.05KB
STM32F103C8T6/测试程序/Library/stm32f10x_can.h
26.91KB
STM32F103C8T6/测试程序/Library/stm32f10x_cec.c
11.38KB
STM32F103C8T6/测试程序/Library/stm32f10x_cec.h
6.42KB
STM32F103C8T6/测试程序/Library/stm32f10x_crc.c
3.27KB
STM32F103C8T6/测试程序/Library/stm32f10x_crc.h
2.11KB
STM32F103C8T6/测试程序/Library/stm32f10x_dac.c
18.64KB
STM32F103C8T6/测试程序/Library/stm32f10x_dac.h
14.88KB
STM32F103C8T6/测试程序/Library/stm32f10x_dbgmcu.c
5.03KB
STM32F103C8T6/测试程序/Library/stm32f10x_dbgmcu.h
3.73KB
STM32F103C8T6/测试程序/Library/stm32f10x_dma.c
28.91KB
STM32F103C8T6/测试程序/Library/stm32f10x_dma.h
20.27KB
STM32F103C8T6/测试程序/Library/stm32f10x_exti.c
6.8KB
STM32F103C8T6/测试程序/Library/stm32f10x_exti.h
6.66KB
STM32F103C8T6/测试程序/Library/stm32f10x_flash.c
61.08KB
STM32F103C8T6/测试程序/Library/stm32f10x_flash.h
24.85KB
STM32F103C8T6/测试程序/Library/stm32f10x_fsmc.c
34.65KB
STM32F103C8T6/测试程序/Library/stm32f10x_fsmc.h
26.38KB
STM32F103C8T6/测试程序/Library/stm32f10x_gpio.c
22.68KB
STM32F103C8T6/测试程序/Library/stm32f10x_gpio.h
19.7KB
STM32F103C8T6/测试程序/Library/stm32f10x_i2c.c
44.71KB
STM32F103C8T6/测试程序/Library/stm32f10x_i2c.h
29.33KB
STM32F103C8T6/测试程序/Library/stm32f10x_iwdg.c
4.8KB
STM32F103C8T6/测试程序/Library/stm32f10x_iwdg.h
3.74KB
STM32F103C8T6/测试程序/Library/stm32f10x_pwr.c
8.55KB
STM32F103C8T6/测试程序/Library/stm32f10x_pwr.h
4.28KB
STM32F103C8T6/测试程序/Library/stm32f10x_rcc.c
50.07KB
STM32F103C8T6/测试程序/Library/stm32f10x_rcc.h
29.74KB
STM32F103C8T6/测试程序/Library/stm32f10x_rtc.c
8.4KB
STM32F103C8T6/测试程序/Library/stm32f10x_rtc.h
3.77KB
STM32F103C8T6/测试程序/Library/stm32f10x_sdio.c
28.25KB
STM32F103C8T6/测试程序/Library/stm32f10x_sdio.h
21.35KB
STM32F103C8T6/测试程序/Library/stm32f10x_spi.c
29.52KB
STM32F103C8T6/测试程序/Library/stm32f10x_spi.h
17.31KB
STM32F103C8T6/测试程序/Library/stm32f10x_tim.c
106.6KB
STM32F103C8T6/测试程序/Library/stm32f10x_tim.h
51.2KB
STM32F103C8T6/测试程序/Library/stm32f10x_usart.c
37.41KB
STM32F103C8T6/测试程序/Library/stm32f10x_usart.h
16.16KB
STM32F103C8T6/测试程序/Library/stm32f10x_wwdg.c
5.6KB
STM32F103C8T6/测试程序/Library/stm32f10x_wwdg.h
2.9KB
STM32F103C8T6/测试程序/Listings/
-
STM32F103C8T6/测试程序/Listings/Project.map
98.48KB
STM32F103C8T6/测试程序/Listings/startup_stm32f10x_md.lst
40.47KB
STM32F103C8T6/测试程序/Objects/
-
STM32F103C8T6/测试程序/Objects/core_cm3.crf
3.84KB
STM32F103C8T6/测试程序/Objects/core_cm3.d
105B
STM32F103C8T6/测试程序/Objects/core_cm3.o
10.78KB
STM32F103C8T6/测试程序/Objects/delay.crf
338.11KB
STM32F103C8T6/测试程序/Objects/delay.d
1.34KB
STM32F103C8T6/测试程序/Objects/delay.o
370.21KB
STM32F103C8T6/测试程序/Objects/led.crf
338.36KB
STM32F103C8T6/测试程序/Objects/led.d
1.31KB
STM32F103C8T6/测试程序/Objects/led.o
369.96KB
STM32F103C8T6/测试程序/Objects/main.crf
338.21KB
STM32F103C8T6/测试程序/Objects/main.d
1.38KB
STM32F103C8T6/测试程序/Objects/main.o
369.28KB
STM32F103C8T6/测试程序/Objects/misc.crf
338.78KB
STM32F103C8T6/测试程序/Objects/misc.d
1.34KB
STM32F103C8T6/测试程序/Objects/misc.o
373.18KB
STM32F103C8T6/测试程序/Objects/Project.axf
257.17KB
STM32F103C8T6/测试程序/Objects/Project.build_log.htm
1.65KB
STM32F103C8T6/测试程序/Objects/Project.htm
33.62KB
STM32F103C8T6/测试程序/Objects/Project.lnp
1.09KB
STM32F103C8T6/测试程序/Objects/Project.sct
479B
STM32F103C8T6/测试程序/Objects/Project_sct.Bak
479B
STM32F103C8T6/测试程序/Objects/Project_Target 1.dep
48.38KB
STM32F103C8T6/测试程序/Objects/startup_stm32f10x_md.d
64B
STM32F103C8T6/测试程序/Objects/startup_stm32f10x_md.o
5.84KB
STM32F103C8T6/测试程序/Objects/stm32f10x_adc.crf
345.78KB
STM32F103C8T6/测试程序/Objects/stm32f10x_adc.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_adc.o
418.02KB
STM32F103C8T6/测试程序/Objects/stm32f10x_bkp.crf
339.7KB
STM32F103C8T6/测试程序/Objects/stm32f10x_bkp.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_bkp.o
382.55KB
STM32F103C8T6/测试程序/Objects/stm32f10x_can.crf
347.36KB
STM32F103C8T6/测试程序/Objects/stm32f10x_can.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_can.o
403.95KB
STM32F103C8T6/测试程序/Objects/stm32f10x_cec.crf
340.24KB
STM32F103C8T6/测试程序/Objects/stm32f10x_cec.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_cec.o
385.04KB
STM32F103C8T6/测试程序/Objects/stm32f10x_crc.crf
338.35KB
STM32F103C8T6/测试程序/Objects/stm32f10x_crc.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_crc.o
374.14KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dac.crf
340.37KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dac.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dac.o
383.19KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dbgmcu.crf
338.14KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dbgmcu.d
1.73KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dbgmcu.o
370.41KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dma.crf
341.82KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dma.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_dma.o
382.69KB
STM32F103C8T6/测试程序/Objects/stm32f10x_exti.crf
339.33KB
STM32F103C8T6/测试程序/Objects/stm32f10x_exti.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_exti.o
377.07KB
STM32F103C8T6/测试程序/Objects/stm32f10x_flash.crf
345.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_flash.d
1.7KB
STM32F103C8T6/测试程序/Objects/stm32f10x_flash.o
407.42KB
STM32F103C8T6/测试程序/Objects/stm32f10x_fsmc.crf
344.17KB
STM32F103C8T6/测试程序/Objects/stm32f10x_fsmc.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_fsmc.o
393.59KB
STM32F103C8T6/测试程序/Objects/stm32f10x_gpio.crf
342.2KB
STM32F103C8T6/测试程序/Objects/stm32f10x_gpio.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_gpio.o
392.5KB
STM32F103C8T6/测试程序/Objects/stm32f10x_i2c.crf
344.57KB
STM32F103C8T6/测试程序/Objects/stm32f10x_i2c.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_i2c.o
412.39KB
STM32F103C8T6/测试程序/Objects/stm32f10x_it.crf
338.27KB
STM32F103C8T6/测试程序/Objects/stm32f10x_it.d
1.59KB
STM32F103C8T6/测试程序/Objects/stm32f10x_it.o
377.68KB
STM32F103C8T6/测试程序/Objects/stm32f10x_iwdg.crf
338.45KB
STM32F103C8T6/测试程序/Objects/stm32f10x_iwdg.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_iwdg.o
374.11KB
STM32F103C8T6/测试程序/Objects/stm32f10x_pwr.crf
339.61KB
STM32F103C8T6/测试程序/Objects/stm32f10x_pwr.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_pwr.o
378.62KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rcc.crf
345.69KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rcc.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rcc.o
411.17KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rtc.crf
339.61KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rtc.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_rtc.o
384.58KB
STM32F103C8T6/测试程序/Objects/stm32f10x_sdio.crf
342.8KB
STM32F103C8T6/测试程序/Objects/stm32f10x_sdio.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_sdio.o
406.17KB
STM32F103C8T6/测试程序/Objects/stm32f10x_spi.crf
342.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_spi.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_spi.o
398.64KB
STM32F103C8T6/测试程序/Objects/stm32f10x_tim.crf
360.35KB
STM32F103C8T6/测试程序/Objects/stm32f10x_tim.d
1.63KB
STM32F103C8T6/测试程序/Objects/stm32f10x_tim.o
493.01KB
STM32F103C8T6/测试程序/Objects/stm32f10x_usart.crf
344.26KB
STM32F103C8T6/测试程序/Objects/stm32f10x_usart.d
1.7KB
STM32F103C8T6/测试程序/Objects/stm32f10x_usart.o
407.46KB
STM32F103C8T6/测试程序/Objects/stm32f10x_wwdg.crf
338.89KB
STM32F103C8T6/测试程序/Objects/stm32f10x_wwdg.d
1.66KB
STM32F103C8T6/测试程序/Objects/stm32f10x_wwdg.o
376.9KB
STM32F103C8T6/测试程序/Objects/system_stm32f10x.crf
339.93KB
STM32F103C8T6/测试程序/Objects/system_stm32f10x.d
1.66KB
STM32F103C8T6/测试程序/Objects/system_stm32f10x.o
372.55KB
STM32F103C8T6/测试程序/Project.uvguix.Admin
85.94KB
STM32F103C8T6/测试程序/Project.uvguix.JQL_hp
86.97KB
STM32F103C8T6/测试程序/Project.uvoptx
28.82KB
STM32F103C8T6/测试程序/Project.uvprojx
24.87KB
STM32F103C8T6/测试程序/Start/
-
STM32F103C8T6/测试程序/Start/core_cm3.c
16.87KB
STM32F103C8T6/测试程序/Start/core_cm3.h
83.71KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_cl.s
15.4KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_hd.s
15.14KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_hd_vl.s
15.32KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_ld.s
12.09KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_ld_vl.s
13.34KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_md.s
12.47KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_md_vl.s
13.74KB
STM32F103C8T6/测试程序/Start/startup_stm32f10x_xl.s
15.58KB
STM32F103C8T6/测试程序/Start/stm32f10x.h
619.08KB
STM32F103C8T6/测试程序/Start/system_stm32f10x.c
35.7KB
STM32F103C8T6/测试程序/Start/system_stm32f10x.h
2.04KB
STM32F103C8T6/测试程序/System/
-
STM32F103C8T6/测试程序/System/Delay.c
838B
STM32F103C8T6/测试程序/System/Delay.h
135B
STM32F103C8T6/测试程序/User/
-
STM32F103C8T6/测试程序/User/main.c
161B
STM32F103C8T6/测试程序/User/stm32f10x_conf.h
3.18KB
STM32F103C8T6/测试程序/User/stm32f10x_it.c
4.3KB
STM32F103C8T6/测试程序/User/stm32f10x_it.h
2.04KB
STM32F103C8T6/立创EDA可导入.zip
126.59KB

资源内容介绍

STM32F103C8T6最小系统原理图、PCB、EDA向导和测试程序
/** ****************************************************************************** * @file stm32f10x_tim.c * @author MCD Application Team * @version V3.5.0 * @date 11-March-2011 * @brief This file provides all the TIM firmware functions. ****************************************************************************** * @attention * * 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. * * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2> ****************************************************************************** */#include "stm32f10x_tim.h"#include "stm32f10x_rcc.h"/** @addtogroup STM32F10x_StdPeriph_Driver * @{ *//** @defgroup TIM * @brief TIM driver modules * @{ *//** @defgroup TIM_Private_TypesDefinitions * @{ *//** * @} *//** @defgroup TIM_Private_Defines * @{ */#define SMCR_ETR_Mask ((uint16_t)0x00FF) #define CCMR_Offset ((uint16_t)0x0018)#define CCER_CCE_Set ((uint16_t)0x0001) #defineCCER_CCNE_Set ((uint16_t)0x0004) /** * @} *//** @defgroup TIM_Private_Macros * @{ *//** * @} *//** @defgroup TIM_Private_Variables * @{ *//** * @} *//** @defgroup TIM_Private_FunctionPrototypes * @{ */static void TI1_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter);static void TI2_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter);static void TI3_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter);static void TI4_Config(TIM_TypeDef* TIMx, uint16_t TIM_ICPolarity, uint16_t TIM_ICSelection, uint16_t TIM_ICFilter);/** * @} *//** @defgroup TIM_Private_Macros * @{ *//** * @} *//** @defgroup TIM_Private_Variables * @{ *//** * @} *//** @defgroup TIM_Private_FunctionPrototypes * @{ *//** * @} *//** @defgroup TIM_Private_Functions * @{ *//** * @brief Deinitializes the TIMx peripheral registers to their default reset values. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @retval None */void TIM_DeInit(TIM_TypeDef* TIMx){ assert_param(IS_TIM_ALL_PERIPH(TIMx)); if (TIMx == TIM1) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM1, DISABLE); } else if (TIMx == TIM2) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM2, DISABLE); } else if (TIMx == TIM3) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM3, DISABLE); } else if (TIMx == TIM4) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM4, DISABLE); } else if (TIMx == TIM5) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM5, DISABLE); } else if (TIMx == TIM6) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM6, DISABLE); } else if (TIMx == TIM7) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM7, DISABLE); } else if (TIMx == TIM8) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM8, DISABLE); } else if (TIMx == TIM9) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM9, DISABLE); } else if (TIMx == TIM10) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM10, DISABLE); } else if (TIMx == TIM11) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM11, DISABLE); } else if (TIMx == TIM12) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM12, DISABLE); } else if (TIMx == TIM13) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM13, DISABLE); } else if (TIMx == TIM14) { RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, ENABLE); RCC_APB1PeriphResetCmd(RCC_APB1Periph_TIM14, DISABLE); } else if (TIMx == TIM15) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM15, DISABLE); } else if (TIMx == TIM16) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM16, DISABLE); } else { if (TIMx == TIM17) { RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, ENABLE); RCC_APB2PeriphResetCmd(RCC_APB2Periph_TIM17, DISABLE); } }}/** * @brief Initializes the TIMx Time Base Unit peripheral according to * the specified parameters in the TIM_TimeBaseInitStruct. * @param TIMx: where x can be 1 to 17 to select the TIM peripheral. * @param TIM_TimeBaseInitStruct: pointer to a TIM_TimeBaseInitTypeDef * structure that contains the configuration information for the * specified TIM peripheral. * @retval None */void TIM_TimeBaseInit(TIM_TypeDef* TIMx, TIM_TimeBaseInitTypeDef* TIM_TimeBaseInitStruct){ uint16_t tmpcr1 = 0; assert_param(IS_TIM_ALL_PERIPH(TIMx)); assert_param(IS_TIM_COUNTER_MODE(TIM_TimeBaseInitStruct->TIM_CounterMode)); assert_param(IS_TIM_CKD_DIV(TIM_TimeBaseInitStruct->TIM_ClockDivision)); tmpcr1 = TIMx->CR1; if((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM2) || (TIMx == TIM3)|| (TIMx == TIM4) || (TIMx == TIM5)) { tmpcr1 &= (uint16_t)(~((uint16_t)(TIM_CR1_DIR | TIM_CR1_CMS))); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_CounterMode; } if((TIMx != TIM6) && (TIMx != TIM7)) { tmpcr1 &= (uint16_t)(~((uint16_t)TIM_CR1_CKD)); tmpcr1 |= (uint32_t)TIM_TimeBaseInitStruct->TIM_ClockDivision; } TIMx->CR1 = tmpcr1; TIMx->ARR = TIM_TimeBaseInitStruct->TIM_Period ; TIMx->PSC = TIM_TimeBaseInitStruct->TIM_Prescaler; if ((TIMx == TIM1) || (TIMx == TIM8)|| (TIMx == TIM15)|| (TIMx == TIM16) || (TIMx == TIM17)) { TIMx->RCR = TIM_TimeBaseInitStruct->TIM_RepetitionCounter; } TIMx->EGR = TIM_PSCReloadMode_Immediate; }/** * @brief Initializes the TIMx Channel1 according to the specified * parameters in the TIM_OCInitStruct. * @param TIMx: where x can be 1 to 17 except 6 and 7 to select the TIM peripheral. * @param TIM_OCInitStru

用户评论 (0)

发表评论

captcha