]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/RISC-V_RV32_SiFive_HiFive1_GCC/freedom-metal/doc/html/_sources/devguide/fe310-g000-pll.rst.txt
Base project to replace existing Freedom Studio project using latest Freedom Studio...
[freertos] / FreeRTOS / Demo / RISC-V_RV32_SiFive_HiFive1_GCC / freedom-metal / doc / html / _sources / devguide / fe310-g000-pll.rst.txt
1 FE310-G00 PLL
2 =============
3
4 On targets with a PLL compatible with the FE310-G000 SoC, the PLL is configured
5 at program initialization with a constructor. This PLL sets the clock frequency
6 of the RISC-V CPU, and users of Freedom Metal who wish to set a specific clock
7 rate can use Freedom Metal to request that the PLL take on a certain output rate.
8
9 In the DeviceTree for your target, there should be a node like the following
10 (example taken from the SiFive HiFive1):
11
12 .. code-block:: DeviceTree
13
14         hfclk: clock@4 {
15                 compatible = "sifive,fe310-g000,pll";
16                 clocks = <&hfxoscout &hfroscout>;
17                 clock-names = "pllref", "pllsel0";
18                 reg = <&prci 0x8 &prci 0xc>;
19                 reg-names = "config", "divider";
20                 clock-frequency = <16000000>;
21         };
22
23 The ``clock-frequency`` property of the node sets the requested clock rate of
24 the FE310-G000 PLL. The PLL driver will attempt to configure the PLL to achieve
25 this clock rate.
26
27 Users should note that the FE310-G000 PLL only supports certain input/output
28 clock rate ratios, and so the effective output rate of the PLL may differ from
29 the requested rate.