I2c driver and receiving message

maddis
Posts: 4
Joined: Mon Oct 07, 2019 6:32 pm

I2c driver and receiving message

Postby maddis » Mon Oct 07, 2019 6:42 pm

Hi,

I'm implementing I2c slave with ESP32. I've looked at the example for I2C slave and I got it mostly working, but problem is that data I receive with i2c_slave_read_buffer is not just i2c - message,but it can contain multiple messages even if I read always the same message size that I use. I'm using my own code on other microcontroller to send the i2c messages and they are always same size.

With Arduino I get callback every time I2c driver has received full message. Is that possible with ESP32-idf and how to do it? Or how to differentiate messages from that buffer I get with i2c_slave_read_buffer? Now I mostly get the correct data,but quite often the data is shifted few bytes and that mess ups the decoding.

Who is online

Users browsing this forum: No registered users and 262 guests