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

LTDC HAL modifies RCC clock settings directly #138

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

LTDC HAL modifies RCC clock settings directly #138

rfuest opened this issue Jul 17, 2021 · 1 comment

Comments

@rfuest
Copy link
Contributor

rfuest commented Jul 17, 2021

While I prepared PR #137 I noticed that DisplayContoller::new directly changes the RCC clock configuration. Any changes to the clock configuration at this point won't be reflected in the Clocks struct that is returned when CFGR::freeze is called.

While the changes are limited to PLLSAI, which isn't used by other peripherals at the moment, it would be better to handle all clock setup in rcc.rs.

DisplayController::new does select PLLSAI frequency to match the required pixel clock, which was probably the reason to combine LTDC and clock setup into a single function. But the same could be achieved by adding a pixel_clock(&self) -> Hertz getter to DisplayContig.

@hannobraun
Copy link
Contributor

Good catch! I agree that it would be better to handle this in RCC.

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