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

Interdependent clock source/clock frequency configuration #3011

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bugadani
Copy link
Contributor

@bugadani bugadani commented Jan 21, 2025

This PR implements my idea for #1668

Currently the PR contains implementations for

  • SPI: this one caches the calculated register (so this closes Changing SPI clock is unexpectedly expensive #1666) value due to the calculation being expensive. Currently a single clock source exists, which IIRC is stable, but we have the option to not mark it so.
  • UART/I2C: these do not pre-calculate the register value, but group the clock source together with the baud rate. This is done for consistency, and the future possibility to pre-calculate, just in case. I2C does not yet have a clock source option, but there are chips that have the hardware support (S3 for example).

@bugadani bugadani force-pushed the clk_source branch 10 times, most recently from 473975b to 1656e54 Compare January 23, 2025 15:32
@bugadani bugadani marked this pull request as ready for review January 24, 2025 16:18
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

Successfully merging this pull request may close these issues.

Changing SPI clock is unexpectedly expensive
1 participant