Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RngExt::init modifies RCC clock configuration #139

Open
rfuest opened this issue Jul 17, 2021 · 1 comment
Open

RngExt::init modifies RCC clock configuration #139

rfuest opened this issue Jul 17, 2021 · 1 comment

Comments

@rfuest
Copy link
Contributor

rfuest commented Jul 17, 2021

RngExt::init enables the main PLL, if it isn't already enabled. There are no checks that the PLL multiplication/division factors are correct or that a valid clock is supplied to the PLL.

To improve this I would suggest to remove the PLL related code from init and change it to take a &Clocks argument. Clocks contains a pll48clk_valid field, which could be used to check that a valid clock is supplied to the RNG.

@hannobraun
Copy link
Contributor

Good catch! Your suggestions sounds reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants