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

Fix pps frequency #89

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Unreleased
* Fix the PPS pin frequency so it's not always running at the max frequency ([#89])

[#89]: https://github.com/stm32-rs/stm32-eth/pull/89

## [0.5.1](https://github.com/stm32-rs/stm32-eth/tree/v0.5.1)
* Ensure `packet_id` overflow does not panic ([#87])
Expand Down
2 changes: 1 addition & 1 deletion src/ptp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl EthernetPTP {
/// The PPS output frequency becomes `2 ^ pps_freq`. `pps_freq` is
/// clamped to `[0..31]`.
pub fn set_pps_freq(&mut self, pps_freq: u8) {
let pps_freq = pps_freq.max(31);
let pps_freq = pps_freq.min(31);

// SAFETY: we atomically write to the PTPPPSCR register, which is
// not read or written to anywhere else. The SVD files are incorrectly
Expand Down