# Something I learned about the CPU clock

**URL:** <https://forums.sifive.com/t/something-i-learned-about-the-cpu-clock/2635>\
**Category:** Freedom E300\
**Created:** [July 14, 2019, 9:44pm UTC](https://forums.sifive.com/t/something-i-learned-about-the-cpu-clock/2635 "2019-07-14T21:44:17Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![stef](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@stef](https://forums.sifive.com/u/stef)\
**Post date:** [August 23, 2019, 8:07am UTC](https://forums.sifive.com/t/something-i-learned-about-the-cpu-clock/2635/2 "2019-08-23T08:07:31Z")

</div>

Hello LightBulb,

Thank you for your post, it is very helpful.

However I am new in this field and I would like to make you a question. I have posted a question [here](http://forums.sifive.com/t/clock-generation-and-configuration/2783) about clock generation on HiFive1. I have read the documentation but it is still not clear to me how to change the values of these registers that you are mentioning. I cannot find an interface for that in the sdk, thus I assume that I should use assembly for that (or maybe I am wrong). The only relevant variables that I find in the repo are the `PLL_{R, F, Q, SEL, REFSEL, BYPASS, LOCK}` constants in [sifive\_fe310-g000\_pll.c](https://github.com/sifive/freedom-metal/blob/master/src/drivers/sifive_fe310-g000_pll.c#L16) by I am not sure if I can use these constants somehow in my code.

For example, I know that the `PLLSEL` is the 16th (numbering starts from 0) bit of the `pllcfg` register. However, I am not sure how to modify this register. Any help here is appreciated.

Thanks in advance and I am sorry if my question is silly,  
Stef

---

_[View the full topic](https://forums.sifive.com/t/something-i-learned-about-the-cpu-clock/2635)._
