Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C slave support #214

Open
kuon opened this issue Jun 11, 2022 · 0 comments
Open

I2C slave support #214

kuon opened this issue Jun 11, 2022 · 0 comments

Comments

@kuon
Copy link

kuon commented Jun 11, 2022

I use the STM32L0XX serie of chip as I2C->SPI/UART/IO bridge.

And for this, I need the chip to be in STOP mode and wake up on I2C address match.

I currently have a working rust implementation that does not use this HAL, but I'd like to improve it so it could get included.

I do not know what would be the best way to proceed as, while my code work, it might not be "friendly" to include in this HAL without a whole rewrite.

I'd be up to do it, but first I have a few questions:

  • Is there interest for this in the users of this HAL?
  • How do we implement interrupt in a HAL like this? As we need to handle the I2C interrupts, also, the chip is very sensitive to delay, and very little work can be done in the I2C interrupt handler, how do you handle the sharing of resources in the HAL (I use cortex-rtic in my implementation to share the buffer).
  • I2C slave might be possible with DMA, but I never used DMA in rust yet, I'm familiar with it in C, but the whole concept of DMA is a big "no-no" in the rust philosophy, so I am a bit puzzled in how it should be handled.
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

No branches or pull requests

1 participant