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

Stable driver: I2C master #2493

Open
6 of 38 tasks
MabezDev opened this issue Nov 8, 2024 · 6 comments
Open
6 of 38 tasks

Stable driver: I2C master #2493

MabezDev opened this issue Nov 8, 2024 · 6 comments
Assignees
Milestone

Comments

@MabezDev
Copy link
Member

MabezDev commented Nov 8, 2024

As part of #2491, which has more details on driver analysis.

esp-hal API-GUIDELINE omissions


Rust API guideline omissions


Hardware feature omissions

Mode/features of the driver that are lacking

  • I2C_CHUNK_SIZE needs to be clarified - all devices have 32x8bit RAM
  • The different per-device implementations can probably be consolidated a bit

Misc


@bjoernQ

This comment was marked as resolved.

@jessebraham
Copy link
Member

jessebraham commented Dec 3, 2024

Just braindumping in this comment for now, will be edited many times I'm sure. Possibly some of these things are supported, already have open issues, or are out of scope. Will convert things to issues as needed at a later date.

Missing functionality:

  • I2C: Digital noise filtering
  • I2C: Serial/parallel data converter
  • I2C: SDA/SCL configuration (need to expand on the details here)
  • I2C: Timeout control
  • I2C: FIFO/Non-FIFO mode
  • I2C: Support for all hardware interrupts

Sorry, something went wrong.

@bugadani
Copy link
Contributor

bugadani commented Dec 3, 2024

Dual-address mode

This is a slave-mode feature as far as I can tell, please double check.

@MabezDev MabezDev assigned bjoernQ and unassigned jessebraham and SergioGasquez Dec 6, 2024
@bjoernQ
Copy link
Contributor

bjoernQ commented Dec 9, 2024

I2C_CHUNK_SIZE needs to be clarified - all devices have 32x8bit RAM

ESP32-C2 is 16 × 8 bits

IIRC it's only relevant for ESP32 / ESP32-S2 - on later chips it's an arbitrary value. Probably because on ESP32/ESP32-S2 there is no FIFO_WM

@bjoernQ
Copy link
Contributor

bjoernQ commented Dec 10, 2024

Nitpick and not important for stabilization: setup_write and setup_read could use impl Trait for cmd_iterator to better align with other parts of the code

@bugadani
Copy link
Contributor

bugadani commented Dec 10, 2024

What do you mean by chunk_size being arbitrary? Data ends up being copied into the register block starting with I2C_TXFIFO_START_ADDR, where there is a 128 byte address space empty, but is all that useable? Or do I completely misunderstand how this works?

Oh I understand we're detecting that the fifo is full and block on it... Alright.

@MabezDev MabezDev assigned MabezDev and unassigned bjoernQ and JurajSadel Dec 11, 2024
@MabezDev MabezDev changed the title Stable driver analysis: I2C master Stable driver: I2C master Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

7 participants