Skip to content

Conversation

HybridChild
Copy link

Summary

Implements I2C MultiMaster (Slave) functionality for STM32 v1 hardware.

Changes

  • Blocking slave operations: blocking_listen(), blocking_respond_to_read(), blocking_respond_to_write()
  • Async slave operations with DMA: listen(), respond_to_read(), respond_to_write()
  • Robust error handling and transaction termination detection
  • Example code for both blocking and async
  • Rename FrameOptions enum to OperationFraming and add documentation

Testing

Tested on STM32F401RE Nucleo board with Digilent Analog Discovery acting as I2C Master.

I2C frequency: 100kHz
Slave address: 0x42 (7-bit)

  • ✅ Basic Write and Read operations
  • ✅ Write-Read combined transactions with RESTART
  • ✅ Variable-length transfers: Pad with 0x00 when Master read exceeds buffer size
  • ✅ Variable-length transfers: Discard bytes when Master write exceeds buffer size

Related Issues

stm32/i2c: slave mode support #622

…ation during v1 rework"

This reverts commit d38e1de962b92d1d48f1991ce09e494ea46d3f7f.
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.

1 participant