資源簡(jiǎn)介
STM32F429--STM32的PWM占空比產(chǎn)生與測(cè)量
三個(gè)參數(shù),TIM_Prescaler控制計(jì)數(shù)頻率,此處9000即計(jì)數(shù)頻率為90M/9000 = 10Khz,即計(jì)數(shù)一次的時(shí)間為0.1ms,TIM_Period控制PWM波周期時(shí)間,此處1000即PWM波的周期為1000*0.1ms = 100ms;TIM_Pulse控制有效電平時(shí)間,此處300即有效電平時(shí)間為300*0.1ms=30ms;調(diào)用初始化程序,上點(diǎn)即產(chǎn)生PWM波信號(hào)。
---------------------
作者:Henchyoung
來源:CSDN
原文:https://blog.csdn.net/qq_39540224/article/details/81178957
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!

代碼片段和文件信息
/**
??******************************************************************************
??*?@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)?????????????????????
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????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個(gè)文件信息
- 上一篇:智能家居系統(tǒng)原理圖PDF
- 下一篇:opencvforunity最新版
評(píng)論
共有 條評(píng)論