I am currently trying to access the unique identifier found in the system file layout on the M24SR64 of the STM32L475 Discovery Kit.
I use the M24SR library and according to the doc, the UID is accessible at offset 8.
Below is a portion of main.cpp
#define NFC_I2C_SDA_PIN PB_11 #define NFC_I2C_SCL_PIN PB_10 #define NFC_GPO_PIN PE_4 #define NFC_RF_DISABLE_PIN PE_2 #define M24SR_ADDR 0xAC I2C i2cChannel(NFC_I2C_SDA_PIN, NFC_I2C_SCL_PIN); M24SR nfcTag(M24SR_ADDR, i2cChannel, NULL, NFC_GPO_PIN, NFC_RF_DISABLE_PIN); nfcTag.init(NULL); // no call back needed, default behavior is sync nfcTag.select_system_file(); uint8_t uid; uint16_t ret; ret = nfcTag.read_binary(0x0008, 0x07, uid); printf("%04x init %02x %02x %02x %02x %02x %02x %02x\n\r", ret, uid, uid, uid, uid, uid, uid, uid);
Unfortunately, the code above yields error 0x0011 which indicates M24SR_IO_ERROR_I2CTIMEOUT.
Any ideas how I can address this? Did I miss an obvious step with i2c and timeout?