在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,91精品国产91免费

<menu id="6qfwx"><li id="6qfwx"></li></menu>
    1. <menu id="6qfwx"><dl id="6qfwx"></dl></menu>

      <label id="6qfwx"><ol id="6qfwx"></ol></label><menu id="6qfwx"></menu><object id="6qfwx"><strike id="6qfwx"><noscript id="6qfwx"></noscript></strike></object>
        1. <center id="6qfwx"><dl id="6qfwx"></dl></center>

            新聞中心

            EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > SystemInit()函數(shù)的結(jié)構(gòu)分析

            SystemInit()函數(shù)的結(jié)構(gòu)分析

            作者: 時(shí)間:2016-11-23 來(lái)源:網(wǎng)絡(luò) 收藏
            系統(tǒng)函數(shù)調(diào)用順序startup_stm32f10x_cl.s→ SystemInit() → SetSysClock()→ SetSysClockTo72()

            總結(jié):開(kāi)始是在keil4里看代碼,很混亂,后來(lái)把他粘到Notepad編輯器,一點(diǎn)擊就可以看出這個(gè)子函數(shù)到哪結(jié)束

            本文引用地址:http://www.biyoush.com/article/201611/320445.htm

            [cpp]view plaincopy
            1. #ifdefined(STM32F10X_LD_VL)||(definedSTM32F10X_MD_VL)||(definedSTM32F10X_HD_VL)
            2. /*#defineSYSCLK_FREQ_HSEHSE_VALUE*/
            3. #defineSYSCLK_FREQ_24MHz24000000
            4. #else
            5. /*#defineSYSCLK_FREQ_HSEHSE_VALUE*/
            6. /*#defineSYSCLK_FREQ_24MHz24000000*/
            7. /*#defineSYSCLK_FREQ_36MHz36000000*/
            8. /*#defineSYSCLK_FREQ_48MHz48000000*/
            9. /*#defineSYSCLK_FREQ_56MHz56000000*/
            10. #defineSYSCLK_FREQ_72MHz72000000
            11. #endif

            下面定義的SystemCoreClock 變量是為了方便取出幾種情況下系統(tǒng)時(shí)鐘的實(shí)際值,例SYSCLK_FREQ_24MHz 也就是24000000。

            [cpp]view plaincopy
            1. #ifdefSYSCLK_FREQ_HSE
            2. uint32_tSystemCoreClock=SYSCLK_FREQ_HSE;/*!equency(CoreClock)*/
            3. #elifdefinedSYSCLK_FREQ_24MHz
            4. uint32_tSystemCoreClock=SYSCLK_FREQ_24MHz;/*!
            5. #elifdefinedSYSCLK_FREQ_36MHz
            6. uint32_tSystemCoreClock=SYSCLK_FREQ_36MHz;/*!
            7. #elifdefinedSYSCLK_FREQ_48MHz
            8. uint32_tSystemCoreClock=SYSCLK_FREQ_48MHz;/*!
            9. #elifdefinedSYSCLK_FREQ_56MHz
            10. uint32_tSystemCoreClock=SYSCLK_FREQ_56MHz;/*!
            11. #elifdefinedSYSCLK_FREQ_72MHz
            12. uint32_tSystemCoreClock=SYSCLK_FREQ_72MHz;/*!
            13. #else/*!
            14. uint32_tSystemCoreClock=HSI_VALUE;/*!
            15. #endif

            [cpp]view plaincopy
            1. staticvoidSetSysClock(void)
            2. {
            3. #ifdefSYSCLK_FREQ_HSE
            4. SetSysClockToHSE();
            5. #elifdefinedSYSCLK_FREQ_24MHz
            6. SetSysClockTo24();
            7. #elifdefinedSYSCLK_FREQ_36MHz
            8. SetSysClockTo36();
            9. #elifdefinedSYSCLK_FREQ_48MHz
            10. SetSysClockTo48();
            11. #elifdefinedSYSCLK_FREQ_56MHz
            12. SetSysClockTo56();
            13. #elifdefinedSYSCLK_FREQ_72MHz
            14. SetSysClockTo72();
            15. #endif
            16. /*Ifnoneofthedefineaboveisenabled,theHSIisusedasSystemclock
            17. source(defaultafterreset)*/
            18. }

            [cpp]view plaincopy
            1. #ifdefSYSCLK_FREQ_HSE
            2. /**
            3. *@briefSelectsHSEasSystemclocksourceandconfigureHCLK,PCLK2
            4. *andPCLK1prescalers.
            5. *@noteThisfunctionshouldbeusedonlyafterreset.
            6. *@paramNone
            7. *@retvalNone
            8. */
            9. staticvoidSetSysClockToHSE(void)
            10. {
            11. ......
            12. }

            [cpp]view plaincopy
            1. #elifdefinedSYSCLK_FREQ_24MHz
            2. /**
            3. *@briefSetsSystemclockfrequencyto24MHzandconfigureHCLK,PCLK2
            4. *andPCLK1prescalers.
            5. *@noteThisfunctionshouldbeusedonlyafterreset.
            6. *@paramNone
            7. *@retvalNone
            8. */
            9. staticvoidSetSysClockTo24(void)
            10. {
            11. ........
            12. }

            [cpp]view plaincopy
            1. #elifdefinedSYSCLK_FREQ_36MHz
            2. /**
            3. *@briefSetsSystemclockfrequencyto36MHzandconfigureHCLK,PCLK2
            4. *andPCLK1prescalers.
            5. *@noteThisfunctionshouldbeusedonlyafterreset.
            6. *@paramNone
            7. *@retvalNone
            8. */
            9. staticvoidSetSysClockTo36(void)
            10. {
            11. ......
            12. }
            省略幾個(gè)......

            [cpp]view plaincopy
            1. #elifdefinedSYSCLK_FREQ_72MHz
            2. /**
            3. *@briefSetsSystemclockfrequencyto72MHzandconfigureHCLK,PCLK2
            4. *andPCLK1prescalers.
            5. *@noteThisfunctionshouldbeusedonlyafterreset.
            6. *@paramNone
            7. *@retvalNone
            8. */
            9. staticvoidSetSysClockTo72(void)
            10. {
            11. .......
            12. }
            這樣結(jié)構(gòu)就很明晰了。


            評(píng)論


            技術(shù)專區(qū)

            關(guān)閉