stm32f7xx-hal
stm32f7xx-hal copied to clipboard
RngExt::init modifies RCC clock configuration
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.
Good catch! Your suggestions sounds reasonable.