2022-04-29 09:46 AM
For RF access, if the requested read is entirely within a locked area, the document shows that both device variants will give an error:
But the document doesn't show the corresponding case for I2C - it only shows the case where part of the requested range is locked:
So what happens in the case where the requested read is entirely within a locked area?
Is there a specific error returned? Or does the entire read give FFs? Or what?
What is the recommended way to detect that a read has failed due to locking?
ie, how do we know if its genuine FF data, or just FF due to locking?
Solved! Go to Solution.
2022-05-03 09:59 AM
Hello Andrew,
For I2C, in case the read is entirely within a read locked area, invalid data (FFh) is read.
In case the I2C read is staring in a read locked area and ending in a readable area, only invalid data is read (FFh) as well. This is both true for ST25DVxxK and ST25DVxxKC.
The rule is that ST25DV releases the I2C SDA line as soon as a un-readable byte is encountered.
In ST25DVxxK, it can be a read protected byte, an area border or end of user memory.
In ST25DVxxKC, it can be a read protected byte or end of dynamic registers area.
Due to the very nature of I2C bus, there is no specific error returned. The only thing the ST25DV is doing is releasing the SDA line, which creates the FFh value.
Normally, the I2C master knows which area is read protected and which is not and does not need to determine it with the returned value.
Best regards.
2022-05-03 09:59 AM
Hello Andrew,
For I2C, in case the read is entirely within a read locked area, invalid data (FFh) is read.
In case the I2C read is staring in a read locked area and ending in a readable area, only invalid data is read (FFh) as well. This is both true for ST25DVxxK and ST25DVxxKC.
The rule is that ST25DV releases the I2C SDA line as soon as a un-readable byte is encountered.
In ST25DVxxK, it can be a read protected byte, an area border or end of user memory.
In ST25DVxxKC, it can be a read protected byte or end of dynamic registers area.
Due to the very nature of I2C bus, there is no specific error returned. The only thing the ST25DV is doing is releasing the SDA line, which creates the FFh value.
Normally, the I2C master knows which area is read protected and which is not and does not need to determine it with the returned value.
Best regards.
2022-05-04 01:42 AM
@JL. Lebon_O - "The rule is that ST25DV releases the I2C SDA line as soon as a un-readable byte is encountered"
Thanks - that's the key.
"Due to the very nature of I2C bus, there is no specific error returned"
Is there anything noted in any status registers, or similar?
"Normally, the I2C master knows which area is read protected and which is not and does not need to determine it with the returned value"
Fair point.
2022-05-04 06:00 AM
Hello Andrew,
Is there anything noted in any status registers, or similar?
Unfortunately, there is no status register for this.
And in the I2C signaling, the only way to report an error for the salve is a NACK, but during a read, the master is driving the ACKs so the slave cannot signal an error.
Best regards.