STM32L011 I2C slave?
I need to write a code that acts as an I2C slave to another processor, but I haven't figured out how to tell if the master does a repeated start. That is: what does the slave get if there is a "addressed" read? And how does that differ from one byte "addressed" write?
I understand the protocol.
One byte write: start-condition write-command, address-bytes, data, stop condition.
Read: start-condition write-command, address-bytes, repeated start-condition, read-command, ...
But how does that look from the slave processor's POV?
Like, does the I2C-device know that there's an address after every (repeated) start condition? If, after the write command, I clear the address match flag, does it set again, when the read command is encountered after the repeated start condition?
For clarification, I'm talking about memory read, I I should handle non-addressed reads and writes too (without the memory address field).