Skip to content

Conversation

@TrentHouliston
Copy link
Member

Add a CRC peripheral that can do the dynamixel 2.0 format.
There is room for improvement in the future by using a memory-to-memory DMA.
Or potentially replacing this with a utility lookup (testing showed it can be faster than the peripheral if set up correctly in memory)

Copilot AI review requested due to automatic review settings August 2, 2025 09:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a hardware CRC peripheral module to efficiently calculate CRC-16 checksums for Dynamixel 2.0 protocol packets using the STM32H753's hardware CRC unit.

  • Implements a hardware-accelerated CRC processor optimized for Dynamixel 2.0 protocol
  • Adds a demonstration application comparing hardware vs software CRC performance
  • Integrates the new CRC functionality into the main application loop

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/peripherals/mod.rs Adds module declaration for the new CRC peripheral
src/peripherals/crc.rs Implements hardware CRC processor with Dynamixel 2.0 configuration
src/main.rs Integrates CRC demo app into the main application loop
src/apps/mod.rs Adds module declaration and re-export for CRC demo app
src/apps/crc_demo.rs Implements demonstration app comparing hardware vs software CRC methods
Comments suppressed due to low confidence (1)

src/apps/crc_demo.rs:175

  • The expected CRC value [0x21, 0x51] for the 'Read instruction' test case doesn't match the comment in the hardware implementation example which shows [0x1D, 0x15] for what appears to be the same packet data. This inconsistency should be verified and corrected.
                &[0xFF, 0xFF, 0xFD, 0x00, 0x01, 0x07, 0x00, 0x02, 0x00, 0x00, 0x02, 0x00][..],

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@TrentHouliston TrentHouliston added this pull request to the merge queue Aug 2, 2025
Merged via the queue into main with commit 1c7a6ce Aug 2, 2025
9 checks passed
@TrentHouliston TrentHouliston deleted the houliston/crc branch August 2, 2025 10:40
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.

2 participants