資源簡介
STM32F407ZGT6串口通信講解,通過串口助手發送一個字符到單片機,單片機收到后發送一個到串口調試助手。

代碼片段和文件信息
/**
??******************************************************************************
??*?@file????system_stm32f4xx.c
??*?@author??MCD?Application?Team
??*?@version?V1.7.0
??*?@date????22-April-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??2018-10-02?17:17??uart1_demo1\
?????目錄???????????0??2018-09-20?16:52??uart1_demo1\CMSIS\
?????目錄???????????0??2018-09-20?16:52??uart1_demo1\CMSIS\Include\
?????文件????????7253??2016-05-19?01:08??uart1_demo1\CMSIS\Include\arm_common_tables.h
?????文件????????3942??2016-05-19?01:09??uart1_demo1\CMSIS\Include\arm_const_structs.h
?????文件??????252177??2016-05-19?01:08??uart1_demo1\CMSIS\Include\arm_math.h
?????文件???????36181??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_cm0.h
?????文件???????43812??2016-05-19?01:09??uart1_demo1\CMSIS\Include\core_cm0plus.h
?????文件??????103865??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_cm3.h
?????文件??????114403??2016-05-19?01:09??uart1_demo1\CMSIS\Include\core_cm4.h
?????文件??????138654??2016-05-19?01:09??uart1_demo1\CMSIS\Include\core_cm7.h
?????文件???????18323??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_cmFunc.h
?????文件???????27908??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_cmInstr.h
?????文件???????22947??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_cmSimd.h
?????文件???????44330??2016-05-19?01:09??uart1_demo1\CMSIS\Include\core_sc000.h
?????文件??????102775??2016-05-19?01:08??uart1_demo1\CMSIS\Include\core_sc300.h
?????文件???????29604??2018-09-17?17:46??uart1_demo1\CMSIS\startup_stm32f40_41xxx.s
?????文件??????919428??2016-05-19?01:12??uart1_demo1\CMSIS\stm32f4xx.h
?????文件????????5851??2016-11-09?02:19??uart1_demo1\CMSIS\stm32f4xx_conf.h
?????文件???????60305??2016-05-19?01:12??uart1_demo1\CMSIS\system_stm32f4xx.c
?????文件????????2232??2016-05-19?01:12??uart1_demo1\CMSIS\system_stm32f4xx.h
?????目錄???????????0??2018-09-21?13:15??uart1_demo1\DebugConfig\
?????文件????????2084??2015-10-27?12:06??uart1_demo1\DebugConfig\Target_1_STM32F407ZGTx.dbgconf
?????文件????????2084??2015-10-27?12:06??uart1_demo1\DebugConfig\Tset_STM32F407ZGTx.dbgconf
?????文件????????2084??2015-10-27?12:06??uart1_demo1\DebugConfig\demo_STM32F407ZGTx.dbgconf
?????目錄???????????0??2019-02-18?00:11??uart1_demo1\Listings\
?????目錄???????????0??2018-11-07?21:44??uart1_demo1\ob
?????文件???????12132??2018-09-20?17:23??uart1_demo1\ob
?????目錄???????????0??2018-09-20?16:52??uart1_demo1\STM32F4xx_StdPeriph_Driver\
?????文件??????122631??2016-11-09?02:18??uart1_demo1\STM32F4xx_StdPeriph_Driver\Release_Notes.html
?????目錄???????????0??2018-09-20?16:52??uart1_demo1\STM32F4xx_StdPeriph_Driver\inc\
............此處省略111個文件信息
- 上一篇:rootfs-brmin.tar.gz
- 下一篇:自己寫的,平衡小車代碼,親測有效
評論
共有 條評論