Skip to content

Conversation

@towynlin
Copy link
Contributor

@towynlin towynlin commented Oct 19, 2025

The Bristlemouth dev kit uses the ADIN2111 with config pins strapped for OPEN Alliance SPI. The MCU on the Bristlemouth Mote is an STM32U5. The C and C++ firmware are open source in the bristlemouth GitHub organization, especially bm_core and bm_protocol.

This PR will add OPEN Alliance SPI support to the embassy driver, which currently only supports Generic SPI mode.

Summary of Changes (The Plan)

  • Rename existing directory examples/stm32u5 -> examples/stm32u5g9 with no changes
  • Create new directory examples/stm32u575
  • Add protocol abstraction layer trait to ADIN1110 driver
  • Refactor existing Generic SPI to be one implementation of the protocol trait
  • Add new OPEN Alliance TC6 SPI implementation of the protocol trait

✨ WIP ✨

Modify clocks and pins for Bristlemouth dev kit
@i509VCB i509VCB added e-stm32 Issues for the STM32 family of chips kind-example labels Oct 19, 2025
towynlin and others added 10 commits October 19, 2025 16:59
I copied from the existing stm32u5 dir
and deleted any that had build errors.
We can add them again in the future,
and I'll check the ones that remain on my board
before marking the PR ready for review.

I'm focusing only on the spe_adin1110_http_server example.
Add support for the OPEN Alliance 10BASE-T1x MAC-PHY Serial Interface (TC6)
protocol as an alternative to the Generic SPI protocol.

Key features:
- Chunk-based protocol with 4-byte header/footer + 64-byte payload
- Control transactions for register read/write (DNC=0)
- Data transactions for Ethernet frames (DNC=1)
- Even parity calculation for error detection
- Support for both TX and RX data chunks
- Configurable via 'tc6' feature flag

Implementation includes:
- src/protocol/tc6.rs: TC6 protocol implementation
- Adin1110Protocol trait implementation for Tc6<SPI>
- MdioBus trait implementation for PHY register access
- new_tc6() constructor for easy instantiation
- Updated README with TC6 documentation

The TC6 protocol is selected via hardware pins (SPI_CFG0/SPI_CFG1)
and complements the existing Generic SPI support.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e-stm32 Issues for the STM32 family of chips kind-example

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants