I2C Slave Raising "onReceive" Event, But Master Never Request Data

Alright I could use some help here on this weird issue I saw today while testing my application.

Long story, short, while trying to debug another issue, I saw in my output logs, messages that only occur in the func mapped to "onReceive" for my Slave device. Here's the thing, for this to have happened, I would have also seen respective output messages on the Master device that it requested data ... but those logs don't exist.

Somehow, the Wire code was thinking a request came in from the Master, when it didn't, only way I can explain it.

Now this doesn't appear to be a common issue, it was a fluke I found it, though it could be happening more frequently then I realize, I've just never seen it in my output messages (I have a lot). Even even more, it doesn't APPEAR to be causing any problem, but, I can't say for sure, as I have another issue I am pinning down, but at the current time, appears to be completely unrelated.

I have already put in place a work around for this, as any message the Master sends to the Slave has a flag in the data that flat out says if the message sent was simply that, or a request for data from the Slave. However, I'd still just like to get a better understanding of what's going on. While yes, my code should prevent this, I feel the base I2C code shouldn't have even gotten to this scenario.

For the record the Master is an ESP32 DevKitC, and the Slave is a Teensy 4.1 (I have also two other Teensy 4.0s on the I2C lines, but they haven't been coded yet, aka, brand new, and aren't doing anything at all)

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.