Implement Remote UART Bus protocol (Gen 2 compatible)#587
Open
AILIFE-4798 wants to merge 2 commits intoEFeru:mainfrom
Open
Implement Remote UART Bus protocol (Gen 2 compatible)#587AILIFE-4798 wants to merge 2 commits intoEFeru:mainfrom
AILIFE-4798 wants to merge 2 commits intoEFeru:mainfrom
Conversation
Owner
|
@AILIFE-4798 seems like there is an error: |
Author
|
fixed error |
Author
|
run build again |
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.
This PR implements the Remote UART Bus protocol for the Gen 1 FOC hoverboard firmware, allowing it to seamlessly communicate on the same bus as Gen 2 devices.
Why this is the best protocol on the market: Unlike other protocols (like standard UART or PWM) which are typically limited to point-to-point communication or addressing only 2 boards (Slave/Master), the Remote UART Bus protocol supports addressing up to 256 individual boards on a single bus. This scalability makes it the superior choice for complex robotics projects, multi-axis machines, and fleet management where many motors need to be coordinated simultaneously without a web of point-to-point wires.
Key Changes:
Protocol Standardization:
Aligns fully with the Gen 2 reference implementation.
Uses Little-Endian byte order for all multi-byte fields (native ARM format).
Standardizes telemetry units to 0.01V and 0.01A (Centi-units) for higher precision and compatibility.
Robust Communication:
Implements a Request-Response telemetry mechanism (Master Polls -> Slave Responds) to prevent bus collisions.
Uses CRC-16 CCITT (0x1021) for reliable error checking.
Configurable & Dual-Slave Support:
Each board can be assigned a unique SLAVE_ID.
Single-board dual-motor control is supported via SLAVE_ID (Left) and SLAVE_ID + 1 (Right).
Enabled via VARIANT_REMOTE_UART_BUS in config.h.
Documentation: Full protocol specification can be found here: PROTOCOL.md.
Verification:
Verified against the Gen 2 GD32 Reference Implementation.
Compiled successfully for Gen 1 FOC hardware (make VARIANT=VARIANT_REMOTE_UART_BUS).
Validated with the updated Online Testing Tool.
Result is AI-Generated, please review carefully.