資源簡介
本程序作為工程模版第一版,方便以后創(chuàng)建程序。
20180518 增加按鍵中斷函數(shù),控制LED1的亮滅。增加準確延時函數(shù)。
20180505 對接收的數(shù)據(jù)進行判斷,選取第三位進行LED的亮滅。
20180505 增加串口接收IDLE中斷,串口可以接收任意字節(jié)的數(shù)據(jù)
20180504 增加串口接收中斷函數(shù),實現(xiàn)鍵盤輸入,不用點擊發(fā)送
20180504 添加串口LED程序,實現(xiàn)發(fā)送'0'LED全滅,發(fā)送'1'LED1亮,發(fā)送'2'LED2亮。
20180503 解決串口2接收問題,去除中斷,只是用狀態(tài)位訪問來辨別是否接收到數(shù)據(jù)。
20180503 解決波特率不匹配問題,改動stmf4xx.h,把HSE的值改為8M。
20180428 完成按鍵程序加入,實現(xiàn)按下反轉(zhuǎn)led
20180426 串口波特率和試劑波特率不匹配
20180421 完成模版的新建
代碼片段和文件信息
/**
??******************************************************************************
??*?@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)?????????????????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????1499136??2019-01-30?15:53??probooter\bin文件燒錄.exe
?????文件????????611??2018-05-19?16:56??probooter\Doc\程序作用.txt
?????文件????????401??2017-02-04?10:10??probooter\keilkill.bat
?????文件?????940127??2016-11-07?23:03??probooter\Libraries\CMSIS\Device\ST\STM32F4xx\Include\stm32f4xx.h
?????文件???????2235??2016-11-07?23:03??probooter\Libraries\CMSIS\Device\ST\STM32F4xx\Include\system_stm32f4xx.h
?????文件??????29607??2016-11-07?23:02??probooter\Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f40_41xxx.s
?????文件??????61020??2016-11-10?18:29??probooter\Libraries\CMSIS\Device\ST\STM32F4xx\Source\Templates\system_stm32f4xx.c
?????文件???????7253??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\arm_common_tables.h
?????文件???????3942??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\arm_const_structs.h
?????文件?????252177??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\arm_math.h
?????文件??????36181??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cm0.h
?????文件??????43812??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cm0plus.h
?????文件?????103865??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cm3.h
?????文件?????114403??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cm4.h
?????文件?????138654??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cm7.h
?????文件??????18323??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cmFunc.h
?????文件??????27908??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cmInstr.h
?????文件??????22947??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_cmSimd.h
?????文件??????44330??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_sc000.h
?????文件?????102775??2016-11-05?01:33??probooter\Libraries\CMSIS\Include\core_sc300.h
?????文件??????29607??2016-11-07?23:02??probooter\Libraries\Startup\arm\startup_stm32f40_41xxx.s
?????文件??????61020??2016-11-10?18:29??probooter\Libraries\Startup\system_stm32f4xx.c
?????文件?????940175??2018-05-03?11:01??probooter\Libraries\stm32f4xx.h
?????文件???????6926??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\misc.h
?????文件??????33008??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_adc.h
?????文件??????27849??2016-11-08?23:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_can.h
?????文件??????12446??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_cec.h
?????文件???????2418??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_crc.h
?????文件??????14483??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_cryp.h
?????文件??????14948??2016-11-05?01:33??probooter\Libraries\STM32F4xx_StdPeriph_Driver\inc\stm32f4xx_dac.h
............此處省略170個文件信息
評論
共有 條評論