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

[ESP32-C6] I2C writes get stuck, since commit f9203d - affects 0.23.{01} and latest main #3060

Open
lure23 opened this issue Jan 29, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@lure23
Copy link
Contributor

lure23 commented Jan 29, 2025

Bug description

I came back to a project of mine, using the VL53L5CX distance sensor, and after updating esp-hal changes to 0.23.0, it always got stuck in I2C operations.

I narrowed down the reason to the commit in the title.

To Reproduce

A bit lengthy instructions (hw and a driver download with click-through are needed) are here.

Expected behavior

I can continue developing the code, using latest esp-hal releases.

Actual behavour

I am stuck at 0.22.0 release.

Environment

  • Target device: ESP32-C6
  • Crate name and version: esp-hal 0.23.0, 0.23.1 and latest main (bb1ad1)
@lure23 lure23 added bug Something isn't working status:needs-attention This should be prioritized labels Jan 29, 2025
@bjoernQ
Copy link
Contributor

bjoernQ commented Jan 30, 2025

I happen to own one of those ToF sensors and have a very simple example using it here: https://github.com/bjoernQ/vl53l5-c2rust

That one still works fine for me. (in the repo it's using a C3, but verified it's works the same on C6)

Your code is unfortunately huge - if you can reduce it a minimal reproducer would help a lot.

The referenced commit belongs to #2544 which basically just "turns off" the peripheral when it gets dropped (just to give some direction to look into)

Hard to say if that commit actually breaks something for you or if it just reveals a problem lurking in the code already before (not saying it's the case)

@lure23
Copy link
Contributor Author

lure23 commented Jan 30, 2025

Thanks @bjoernQ

I'll likely need to carry on with what works for me (0.22), but:

That one still works fine for me. (in the repo it's using a C3, but verified it's works the same on C6)

It's good to know stuff works elsewhere (with the same sensor).

Your code is unfortunately huge - if you can reduce it a minimal reproducer would help a lot.

That made me realize it... might be. 😬 The size is certainly not the goal - on the contrary. The aim is to bridge the gap for a newcomer to get sensors working, but... if it cannot be used as a replication... perhaps something is wrong.

Ideally, it'd be something akin to Arduino in easy-of-embracing.

The referenced commit belongs to #2544 which basically just "turns off" the peripheral when it gets dropped (just to give some direction to look into)

My code keeps the same I2c all through the example, so no dropping. Weird.

I'm looking through the commit, the current (main) code, and your working code. Perhaps I spot something.. In the mean time, I'll leave this issue open, if it's okay.

Hard to say if that commit actually breaks something for you or if it just reveals a problem lurking in the code already before (not saying it's the case)

I agree. Just learning.

@MabezDev MabezDev removed the status:needs-attention This should be prioritized label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants