<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>

新聞中心

EEPW首頁(yè) > 嵌入式系統 > 設計應用 > s3c2410時(shí)鐘信號:FCLK、HCLK和PCLK

s3c2410時(shí)鐘信號:FCLK、HCLK和PCLK

作者: 時(shí)間:2016-12-05 來(lái)源:網(wǎng)絡(luò ) 收藏

  s3c2410 有三個(gè)時(shí)鐘FLCK 、 和PCLK (這3個(gè)時(shí)針都是核心時(shí)針)

本文引用地址:http://dyxdggzs.com/article/201612/341123.htm

  s3c2410 芯片有這么一段話(huà):

   is used by ARM920T ,內核時(shí)鐘,主頻。

   is used for AHB bus, which is used by the ARM920T, the memory controller, the interrupt controller, the LCD controller, the DMA and USB host block. 也就是為AHB總線(xiàn)上的外設提供時(shí)鐘信號,包括USB時(shí)鐘。 AHB總線(xiàn)用于連接高速外設。

  PCLK is used for APB bus, which is used by the peripherals such as WDT, IIS, I2C, PWM timer, MMC interface,ADC, UART, GPIO, RTC and SPI. 也就是為APB總線(xiàn)上的外設提供時(shí)鐘信號,即IO接口時(shí)鐘,串口的時(shí)鐘設置就是從PCLK來(lái)的。APB總線(xiàn)用于連接低速外設。

  The S3C2410X supports selection of Dividing Ratio between , HLCK and PCLK. This ratio is determined by HDIVN and PDIVN of CLKDIVN control register.

  s3c2410可通過(guò)設置CLKDIVN控制寄存器的HDIVN位(第1位)和PDIVN位(第0位)來(lái)改變, HLCK 和 PCLK的比率。

    

  那么如何獲取FCLK, HLCK 和 PCLK的時(shí)針頻率呢?

  可先通過(guò)clk_get獲取一個(gè)clk結構體

  de>/* clk_get獲取一個(gè)名為id的時(shí)針

  * 輸入參數dev: 可以為NULL

  * 輸入參數id: 時(shí)針名稱(chēng),如fclk、hclk、pclk等

  * 返回值: 返回該時(shí)鐘的clk結構體

  */de>

  de>struct clk *clk_get(struct device *dev, const char *id)

  struct clk {

  struct list_head list;

  struct module *owner;

  struct clk *parent;

  const char *name; /* 該時(shí)針名稱(chēng) */

  int id;

  int usage;

  unsigned long rate; /* 時(shí)鐘頻率 */

  unsigned long ctrlbit;

  int (*enable)(struct clk *, int enable);

  int (*set_rate)(struct clk *c, unsigned long rate);

  unsigned long (*get_rate)(struct clk *c);

  unsigned long (*round_rate)(struct clk *c, unsigned long rate);

  int (*set_parent)(struct clk *c, struct clk *parent);

  };

  de>

  再將clk_get返回的clk結構體傳遞給clk_get_rate,獲取該時(shí)鐘的頻率

  de>unsigned long clk_get_rate(struct clk *clk)de>

  一個(gè)例子:

  de>printk(KERN_DEBUG"fclk = %d, pclk = %d, hclk = %d, uclk = %dn",

  clk_get_rate(clk_get(NULL, "fclk")),

  clk_get_rate(clk_get(NULL, "hclk")),

  clk_get_rate(clk_get(NULL, "pclk")),

  clk_get_rate(clk_get(NULL, "uclk")));de>

  這里出現了另一個(gè)時(shí)針uclk,專(zhuān)門(mén)給usb供給時(shí)針信號。uclk是外部時(shí)針源,由s3c2410芯片的gph8/uclk管腳引入,給uart提供外部時(shí)針信號,以獲取更精確地時(shí)針頻率。

  關(guān)于A(yíng)MBA片上總線(xiàn)

  AMBA(Advanced Microcontroller Bus Architecture)是由ARM公司提出的片上總線(xiàn)規范。AMBA 2.0規范包括四個(gè)部分:AHB(AMBA高性能總線(xiàn))、ASB(AMBA系統總線(xiàn))、APB(AMBA外設總線(xiàn))和Test Methodology。

  the Advanced High-performance Bus(AHB)應用于連接高性能、高時(shí)鐘頻率的系統模塊(如CPU、DMA和DSP等)它構成了高性能的系統骨干總線(xiàn)( back-bone bus )。AHB bus上的外設有LCD controller(CONT代表controller,控制器)、USB Host CONT、ExtMaster、Nand CONT和nand flash boot loader、bus CONT、interrupt CONT、power management、memory CONT(sram/nor/sdram等)。

  the Advanced System Bus(ASB)是第一代AMBA系統總線(xiàn),同AHB相比,它數據寬度要小一些,它支持的典型數據寬度為8位、16位、32位。

  the Advanced Peripheral Bus(APB)是本地二級總線(xiàn)(local secondary bus ),通過(guò)橋和AHB/ASB相連。它主要是為了滿(mǎn)足不需要高性能流水線(xiàn)接口或不需要高帶寬接口的設備的互連。APB bus上的外設有UART、USB device、SDI/MMC、Watch Dog Timer、bus CONT、spi、iic、iis、gpio、rtc、adc、timer/pwm。



關(guān)鍵詞: FCLK HCLK

評論


技術(shù)專(zhuān)區

關(guān)閉
国产精品自在自线亚洲|国产精品无圣光一区二区|国产日产欧洲无码视频|久久久一本精品99久久K精品66|欧美人与动牲交片免费播放
<dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><small id="yhprb"></small><dfn id="yhprb"></dfn><small id="yhprb"><delect id="yhprb"></delect></small><small id="yhprb"></small><small id="yhprb"></small> <delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"></dfn><dfn id="yhprb"></dfn><s id="yhprb"><noframes id="yhprb"><small id="yhprb"><dfn id="yhprb"></dfn></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><small id="yhprb"></small><dfn id="yhprb"><delect id="yhprb"></delect></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn> <small id="yhprb"></small><delect id="yhprb"><strike id="yhprb"></strike></delect><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn><dfn id="yhprb"><s id="yhprb"><strike id="yhprb"></strike></s></dfn><dfn id="yhprb"><s id="yhprb"></s></dfn>