fix(mstp): conform master token and PFM transitions to Clause 9.5.6 - #465
Closed
bbartling wants to merge 4 commits into
Closed
fix(mstp): conform master token and PFM transitions to Clause 9.5.6#465bbartling wants to merge 4 commits into
bbartling wants to merge 4 commits into
Conversation
Host async serial reads arrive in multi-millisecond chunks; treating inter-read gaps as Clause 9 T_frame_abort (~1.56ms @ 38400) discarded partial frames mid-assembly. Add decode_frame_stream (Complete/NeedMore/ Invalid), preserve trailing lone 0x55 on preamble miss, and replace wire T_frame_abort with a host stale-partial timeout based on max frame wire time plus USB scheduling slack. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace incorrect reflected polynomials (0xE0 / Modbus 0xA001) with Clause 9.6 values (0x81 / 0x8408). Add literal golden vectors including the live Token 0<-7 frame (CRC 0x37) and data frame 01 00 → 9F 16 so self-round-trip tests cannot mask interoperability failures. Co-authored-by: Cursor <cursoragent@cursor.com>
Move Clause 9 golden / stream tests into mstp_frame_tests.rs so mstp_frame.rs stays under the upstream file-size CI gate. Co-authored-by: Cursor <cursoragent@cursor.com>
DONE_WITH_TOKEN no longer reverse-scans from NS+1 or emits Token TS→TS. Add done_with_token(), FindNewSuccessor via PFM after Nretry_token, and regression tests A–E for multi-master coexistence. Co-authored-by: Cursor <cursoragent@cursor.com>
2 tasks
Contributor
Author
|
Closing: keeping this work on the bbartling fork only ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes multi-master coexistence: Rust MAC 3 must not PFM/Token in ways that rebuild the ring as
0→3→0and exclude FEC MAC 7.Depends on #464 (Clause 9 CRC + USB stream). This branch is stacked on that tip. Prefer review/merge after #464, or treat as follow-up commits on the same train.
Design (Clause 9.5.6)
done_with_token(); no unconditionalpass_token()on DoneWithTokenTests
Mandatory A–E regressions (
clause956_tests.rs), including 2000-rotation ring0→3→7→0.Made with Cursor