Description
I have been able to use a modified version of this library and demo code to read the EEPROM content of ST25DV16K.
Maybe a more generalized version of EEPROM reading where the size and I2C address can be changed would be more usefull.
So here are the change I made are :
_MAX_SIZE_I2C = const(0x800) # 16kbits
and
def __init__(self, i2c_bus, address=0x53, write_protect=False, wp_pin=None):
I have used the following code:
import board
import adafruit_st25dv16
i2c = board.I2C()
eeprom = adafruit_st25dv16.EEPROM_I2C(i2c)
print("length: {}".format(len(eeprom)))
for i in range(0, 4):
j = i * 16
hex_string = ":".join("%02x" % b for b in eeprom[j:j+15])
print(j, "> ", hex_string, "> ", eeprom[j:j+15])
The result is a dump:
0 > e1:40:40:05:03:10:d1:01:0c:55:01:73:74:2e:63:6f > bytearray(b'\xe1@@\x05\x03\x10\xd1\x01\x0cU\x01st.co')
16 > 6d:2f:73:74:32:35:fe:2f:70:72:6f:64:75:63:74:2f > bytearray(b'm/st25\xfe/product/')
32 > 34:37:30:31:fe:00:00:00:00:00:00:00:00:00:00:00 > bytearray(b'4701\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
48 > 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 > bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
We can clearly see the URL written by ST arduino demo code: "st.com/st25" (Hello World exemple from https://github.com/stm32duino/ST25DV )
And part of the URL maybe set by Adafruit in factory: "/product/4701"
So with a bit of code that properly structure the NFC TAG value in the EEPROM it should be possible to use the ST25DV16K from CircuitPython for basic usage of setting the value of the tag.