資源簡介
STM32L152例程,包含各種外設的驅動程序,如定時器、SPI、I2C、串口、ADC、看門狗、SDIO等。開發STM32L152可參考
代碼片段和文件信息
/**
??******************************************************************************
??*?@file????system_stm32l1xx.c
??*?@author??MCD?Application?Team
??*?@version?V1.3.3
??*?@date????20-April-2015
??*?@brief???CMSIS?Cortex-M3?Device?Peripheral?Access?layer?System?Source?File.
??*??????????This?file?contains?the?system?clock?configuration?for?STM32L1xx?Ultra
??*??????????Low?Power?devices?and?is?generated?by?the?clock?configuration
??*??????????tool?“STM32L1xx_Clock_Configuration_V1.1.0.xls“.
??*?????????????
??*?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_stm32l1xx_xx.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?MSI?(2.1?MHz?Range)?is?used?as?system?clock?source.
??*????Then?SystemInit()?function?is?called?in?“startup_stm32l1xx_xx.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?MSI?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?8MHz?refer?to?“HSE_VALUE“?define
??*????in?“stm32l1xx.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:??
??*=============================================================================
??*?????????????????????????System?Clock?Configuration
??*=============================================================================
??*????????System?Clock?source??????????|?PLL(HSE)
??*-----------------------------------------------------------------------------
??*????????SYSCLK???????????????????????|?32000000?Hz
??*---------------------------------
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\
?????文件???????24914??2015-04-20?21:15??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\CMSIS?END?USER?LICENCE?AGREEMENT.pdf
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Include\
?????文件??????505206??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Include\stm32l1xx.h
?????文件????????2220??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Include\system_stm32l1xx.h
?????文件???????33403??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Release_Notes.html
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\arm\
?????文件???????14803??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\arm\startup_stm32l1xx_hd.s
?????文件???????13020??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\arm\startup_stm32l1xx_md.s
?????文件???????14559??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\arm\startup_stm32l1xx_mdp.s
?????文件???????14729??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\arm\startup_stm32l1xx_xl.s
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\gcc_ride7\
?????文件???????11998??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\gcc_ride7\startup_stm32l1xx_hd.s
?????文件???????10669??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\gcc_ride7\startup_stm32l1xx_md.s
?????文件???????11745??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\gcc_ride7\startup_stm32l1xx_mdp.s
?????文件???????11909??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\gcc_ride7\startup_stm32l1xx_xl.s
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\iar\
?????文件???????17100??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\iar\startup_stm32l1xx_hd.s
?????文件???????14563??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\iar\startup_stm32l1xx_md.s
?????文件???????16502??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\iar\startup_stm32l1xx_mdp.s
?????文件???????16918??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\iar\startup_stm32l1xx_xl.s
?????文件???????20175??2015-04-21?01:56??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\system_stm32l1xx.c
?????目錄???????????0??2015-04-21?23:43??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\TASKING\
?????文件????????3686??2015-04-20?21:15??STM32L1xx_StdPeriph_Lib_V1.3.1\Libraries\CMSIS\Device\ST\STM32L1xx\Source\Templates\TASKING\cstart_thumb2.asm
............此處省略1490個文件信息
- 上一篇:2018年中國注冊藥品數據庫174469條
- 下一篇:船舶運動數學模型
評論
共有 條評論