资源简介
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最新版
相关资源
- 基于STM32的酒精检测仪
- STM32 OLED打点划线画圆 OLED电子罗盘 程
- STM32+DAC+ADC语音录制与播放
- STM32F103驱动三个超声波模块,串口屏
- 基于STM32F103的24m02芯片驱动代码
- 基于STM32的DAC7562模块驱动代码
- STM32_vl53l0x 激光 测距
- 官方Keil.STM32F4xx_DFP.2.9.0.pack固件库
- msp430f5529三种频率PWM定时输出
- stc12c5a60s2单片机两路pwm
- 基于STM32的四旋翼程序
- stm32f407使用MQ7检测一氧化碳浓度程序
- stm32f407使用继电器程序
- 基于28335的spwm
- DAC8552驱动程序
- LQFP48-STM32F103Cx封装
- STM32F1系列读写内部FLASH
- STM32F1系列ADC DMA读取例程
- 串口打印 温湿度 STM32
- fft算法1024
- DSP28335SVPWM.pdf
- AD7606驱动代码 stm32
- 基于STM32的倾斜仪程序具体设计在博客
- STM32F103C8T6-ADC例程
- STM32F103驱动DS18B20程序
- ADS1256 基于 RT-Thread 4.0.2 版本驱动程序
- STM32 硬件IIC读取BH1750
- STM32控制LED灯
- STM32CubeF4固件包STM32Cube_FW_F4_V1.22.0
- STM32库函数代码自动生成器V1.2破解版
评论
共有 条评论