Open AndreCilia opened 1 year ago
That means you are using esp32s3 i2c as slave? not master? I don't understand your step?
Yes the ESP32S3 is being used as a slave.
IMO, i2c slave clock stretching only occur in several occasions(and slave on esp32s3 doesn't support stretch in software).
Hi Simon,
With your comment that "slave on ESP32s3 doesn't support stretch in software" do you mean that this is a limitation from the Espressif library?
If the Espressif library is the issue, if we re-write or modify the library ourselves would the I2C hardware be able to do clock stretching?
Thanks.
From my understanding. You want a master send a specific command, then slave do a stretch and prepare data and write into fifo. After that, release SCL bus and master reads. So, if you read esp32s3 TRM, you can see our stretch is a hardware-motivated stuff only in few occasions, rather than it can be controlled by software. So maybe this might not satisfy your requirement.
Our currently software doesn't support the stretch as well. It's more like an error handling on esp32s3.
Hi Simon,
I am in contact with Espressif directly with regards to this issue. I have no idea in what state the issue is at since I am not getting any reply from who is taking care of the issue when I ask for updates.
If you can refer to ref:!00D7F0yCNM.!500A903xysz:ref please let me know whether there has been any update.
Thanks and regards, Andre
Hey @AndreCilia did you get any updates on this? I'm running into a similar problem as you, and need slave clock stretching.
Hey @AndreCilia did you get any updates on this? I'm running into a similar problem as you, and need slave clock stretching.
Hi @eccentricOrange, Sorry I couldn't answer before. Espressif gave an unofficial library which works here: https://github.com/leeebo/esp_i2c_slave
Thanks a lot @AndreCilia ! This is helpful for now, though I'd really like for them to release an official solution
Answers checklist.
General issue report
I am currently in the process of developing a smart battery application that uses SMBus as a slave device.
The workflow for communications is as follows:
The issue at hand is that the I2C slave peripheral of the ESP32-S3 is skipping Step 2 of the above flow and since there is only random data in the buffer it sends out that.
Subsequent requests send out the previously written data.