<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > STM32查看系統(tǒng)時(shí)鐘

          STM32查看系統(tǒng)時(shí)鐘

          作者: 時(shí)間:2016-11-10 來源:網(wǎng)絡(luò) 收藏
          調(diào)用庫(kù)函數(shù)RCC_GetClocksFreq,該函數(shù)可以返回片上的各種時(shí)鐘的頻率

          函數(shù)原形void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks)

          本文引用地址:http://www.ex-cimer.com/article/201611/317496.htm

          RCC_ClocksTypeDef定義于文件“stm32f10x_rcc.h”:

          typedef struct
          {
          uint32_t SYSCLK_Frequency; /*!< SYSCLK clock frequency expressed in Hz */
          uint32_t HCLK_Frequency; /*!< HCLK clock frequency expressed in Hz */
          uint32_t PCLK1_Frequency; /*!< PCLK1 clock frequency expressed in Hz */
          uint32_t PCLK2_Frequency; /*!< PCLK2 clock frequency expressed in Hz */
          }RCC_ClocksTypeDef;

          例:
          /* Get the frequencies of different on chip clocks */
          RCC_ClocksTypeDef RCC_Clocks;
          RCC_GetClocksFreq(&RCC_Clocks);

          執(zhí)行完后,直接查看RCC_Clocks,在各成員中取出所需要時(shí)鐘頻率就行了。



          關(guān)鍵詞: STM32系統(tǒng)時(shí)

          評(píng)論


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

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();