资源简介
STM32F429--STM32的PWM占空比产生与测量
三个参数,TIM_Prescaler控制计数频率,此处9000即计数频率为90M/9000 = 10Khz,即计数一次的时间为0.1ms,TIM_Period控制PWM波周期时间,此处1000即PWM波的周期为1000*0.1ms = 100ms;TIM_Pulse控制有效电平时间,此处300即有效电平时间为300*0.1ms=30ms;调用初始化程序,上点即产生PWM波信号。
---------------------
作者:Henchyoung
来源:CSDN
原文:https://blog.csdn.net/qq_39540224/article/details/81178957
版权声明:本文为博主原创文章,转载请附上博文链接!

代码片段和文件信息
/**
******************************************************************************
* @file system_stm32f4xx.c
* @author MCD Application Team
* @version V1.8.0
* @date 09-November-2016
* @brief CMSIS Cortex-M4 Device Peripheral Access layer System Source File.
* This file contains the system clock configuration for STM32F4xx devices.
*
* 1. This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): Setups the system clock (System clock source PLL Multiplier
* and Divider factors AHB/APBx prescalers and Flash settings)
* depending on the configuration made in the clock xls tool.
* This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the “startup_stm32f4xx.s“ file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK) it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
* - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
* be called whenever the core clock is changed
* during program execution.
*
* 2. After each device reset the HSI (16 MHz) is used as system clock source.
* Then SystemInit() function is called in “startup_stm32f4xx.s“ file to
* configure the system clock before to branch to main program.
*
* 3. If the system clock source selected by user fails to startup the SystemInit()
* function will do nothing and HSI still used as system clock source. User can
* add some code to deal with this issue inside the SetSysClock() function.
*
* 4. The default value of HSE crystal is set to 25MHz refer to “HSE_VALUE“ define
* in “stm32f4xx.h“ file. When HSE is used as system clock source directly or
* through PLL and you are using different crystal you have to adapt the HSE
* value to your own configuration.
*
* 5. This file configures the system clock as follows:
*=============================================================================
*=============================================================================
* Supported STM32F40xxx/41xxx devices
*-----------------------------------------------------------------------------
* System Clock source | PLL (HSE)
*-----------------------------------------------------------------------------
* SYSCLK(Hz) | 168000000
*-----------------------------------------------------------------------------
* HCLK(Hz)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2019-05-23 09:13 TIM led\
目录 0 2019-05-23 09:13 TIM led\Doc\
文件 7 2018-07-17 15:44 TIM led\Doc\Readme.txt
目录 0 2019-05-23 09:13 TIM led\Lib\
目录 0 2019-05-23 09:13 TIM led\Lib\CMSIS\
目录 0 2019-05-23 09:13 TIM led\Lib\CMSIS\Include\
文件 7253 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\arm_common_tables.h
文件 3942 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\arm_const_structs.h
文件 252177 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\arm_math.h
文件 36181 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cm0.h
文件 43812 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cm0plus.h
文件 103865 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cm3.h
文件 114403 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cm4.h
文件 138654 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cm7.h
文件 18323 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cmFunc.h
文件 27908 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cmInstr.h
文件 22947 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_cmSimd.h
文件 44330 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_sc000.h
文件 102775 2016-11-05 01:33 TIM led\Lib\CMSIS\Include\core_sc300.h
目录 0 2019-05-23 09:13 TIM led\Lib\CMSIS\arm\
文件 25819 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f401xx.s
文件 29607 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f40_41xxx.s
文件 29696 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f40xx.s
文件 19189 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f410xx.s
文件 26519 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f411xe.s
文件 21484 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f412xg.s
文件 23401 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f413_423xx.s
文件 30981 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f427_437xx.s
文件 31056 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f427x.s
文件 31136 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f429_439xx.s
文件 22148 2016-11-07 23:02 TIM led\Lib\CMSIS\arm\startup_stm32f446xx.s
............此处省略125个文件信息
- 上一篇:智能家居系统原理图PDF
- 下一篇:opencvforunity最新版
相关资源
- I2C读写AT24C02 基于STM32F103 cube116540
- 基于stm32f103ve的程序——跑马灯实验
- 基于STM32RCT6的步进电机驱动程序
- stm32f407上的两个can发送和接收例程
- STM32 led 时钟
- STM32 2.4G通信例程
- 直流无刷电机方波驱动 stm32 例程代码
- STM32中文资料
- STM32蓝牙和串口程序
- STM32f103超声波模块例程
- stm32f103c8t6 4 oled.rar
- stm32f030 IAP Demo(原创)
- 51单片机PWM程序,占空比、周期可调整
- STM32基于rt_thread操作系统的SDHC卡文件
- NRF24L01实现51与STM32双向通讯
- SG3525频率PWM控制均可调模块
- STM32F103 串口程序(完整版)
- stm32 ds18b20 温度传感器 测试通过
- stm32官方例程
- STM32F103定时器中断程序
- [免费]基于stm32f103ze 的OLED驱动代码
- STM32F103RBT6驱动UC1698控制芯片的160160黑
- STM32F103 DS18B20 V3.5.0固件库驱动程序工
- STM32定时器使用入门。看了这个程序会
- SIM908 SDIO FSMC STM32 FIFO
- STM32F103 CC2500完整驱动(模拟SPI)
- AD7606采集程序
- stm32 用SPI 方式读写 SDHC
- stm32通过DMA方式采集ADC数据
- 意法半导体STM全系列微控制器STM32ST
评论
共有 条评论