oxidecomputer / oxidecomputer/hubris

`stm32h7-i2c` chooses timing based on SoC model, not board

Open
#242 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stm32
Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Description

The current configure_timing routine in stm32h7-i2c assumes that any board with a given SoC model has the same clock configuration.

https://github.com/oxidecomputer/hubris/blob/7adbdeda54d1e3cd5fc355517518b40e2abe6b0c/drv/stm32h7-i2c/src/lib.rs#L193

Knowledge of clocks should probably move out of this crate to the caller, who should decide it based on target_board instead.

FYI @bcantrill

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read drv/stm32h7-i2c/src/lib.rs at the configure_timing routine, then trace its callers to understand where target_board is available. The change is done when clock knowledge is supplied by the caller and timing no longer assumes that an SoC model uniquely determines the board's clock configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.