在线看毛片网站电影-亚洲国产欧美日韩精品一区二区三区,国产欧美乱夫不卡无乱码,国产精品欧美久久久天天影视,精品一区二区三区视频在线观看,亚洲国产精品人成乱码天天看,日韩久久久一区,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>

            新聞中心

            STM32F107VCT6的RCC配置

            作者: 時(shí)間:2016-11-10 來(lái)源:網(wǎng)絡(luò) 收藏
            /****************************************************************/
            /* HSE=25MHz
            /* HCLK=72MHz
            /* PCLK2=72MHz
            /* PCLK1=36MHz
            /****************************************************************/

            void RCC_Configuration(void)
            {
            ErrorStatus HSEStartUpStatus;

            /* RCC system reset(for debug purpose) */
            RCC_DeInit();

            /* Enable HSE */
            RCC_HSEConfig(RCC_HSE_ON);

            /* Wait till HSE is ready */
            HSEStartUpStatus = RCC_WaitForHSEStartUp();

            if (HSEStartUpStatus != ERROR)
            {
            /* Enable Prefetch Buffer */
            FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);

            /****************************************************************/
            /* HSE=25MHz, HCLK=72MHz, PCLK2=72MHz, PCLK1=36MHz */
            /****************************************************************/
            /* Flash 2 wait state */
            FLASH_SetLatency(FLASH_Latency_2);
            /* HCLK = SYSCLK */
            RCC_HCLKConfig(RCC_SYSCLK_Div1);
            /* PCLK2 = HCLK */
            RCC_PCLK2Config(RCC_HCLK_Div1);
            /* PCLK1 = HCLK/2 */
            RCC_PCLK1Config(RCC_HCLK_Div2);
            /* ADCCLK = PCLK2/4 */
            RCC_ADCCLKConfig(RCC_PCLK2_Div6);

            /* Configure PLLs *********************************************************/
            /* PPL2 configuration: PLL2CLK = (HSE / 5) * 8 = 40 MHz */
            RCC_PREDIV2Config(RCC_PREDIV2_Div5);
            RCC_PLL2Config(RCC_PLL2Mul_8);

            /* Enable PLL2 */
            RCC_PLL2Cmd(ENABLE);

            /* Wait till PLL2 is ready */
            while (RCC_GetFlagStatus(RCC_FLAG_PLL2RDY) == RESET)
            {}

            /* PPL1 configuration: PLLCLK = (PLL2 / 5) * 9 = 72 MHz */
            RCC_PREDIV1Config(RCC_PREDIV1_Source_PLL2, RCC_PREDIV1_Div5);
            RCC_PLLConfig(RCC_PLLSource_PREDIV1, RCC_PLLMul_9);

            /* Enable PLL */
            RCC_PLLCmd(ENABLE);

            /* Wait till PLL is ready */
            while (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
            {}

            /* Select PLL as system clock source */
            RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

            /* Wait till PLL is used as system clock source */
            while (RCC_GetSYSCLKSource() != 0x08)
            {}
            }
            }

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



            關(guān)鍵詞: STM32F107VCT6RCC配

            評(píng)論


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

            關(guān)閉