2020-03-27 06:43 AM
Im sending the "Get System Info" command to check receiving data correctly from the M24LR04 via I2C.
The packet that I sending is {0x00 (request flags), 0x2B(get system info command), 0xF6 (CRC LSB), 0x75 (CRC MSB) }
the response that I get is 0xFF for all.
I'm using the STM32F031 MCU and keil IDE
also using the functions HAL_I2C_Master_Transmit / HAL_I2C_Master_Receive from the stm32f0xx_hal_i2c.c library.
I have on the same board another chip connecting to SDA/SCL lines and I manage to communicate with successfully.
code example:
uint8_t buffTx[4] = {0x00,0x2B, 0xF6 , 0x75 };
HAL_I2C_Master_Transmit(&hi2c1, M24LR_Add, buffTx, 4, 10);
HAL_I2C_Master_Receive(&hi2c1, M24LR_Add, dataBufferAdd, 8, 10);
Any help would be appreciated.
Thanks!
Solved! Go to Solution.
2020-03-27 09:36 AM
Hi @EBen- ,
Are you sure this is a M24LR04 and not an M24SR, because for the M24LR, the get system info command is used only for RF side not with I²C. To access these information you just have to read registers in the system area (E2=1) at address 2332. You can check registers in the datasheet p30 https://www.st.com/content/st_com/en/products/nfc/st25-nfc-rfid-tags-readers/st25-dynamic-nfc-tags/m24lr-series-dynamic-nfc-tags/m24lr04e-r.html.
Hope this can help you.
Best Regards.
2020-03-27 09:36 AM
Hi @EBen- ,
Are you sure this is a M24LR04 and not an M24SR, because for the M24LR, the get system info command is used only for RF side not with I²C. To access these information you just have to read registers in the system area (E2=1) at address 2332. You can check registers in the datasheet p30 https://www.st.com/content/st_com/en/products/nfc/st25-nfc-rfid-tags-readers/st25-dynamic-nfc-tags/m24lr-series-dynamic-nfc-tags/m24lr04e-r.html.
Hope this can help you.
Best Regards.
2020-03-28 06:47 AM
Thank you @Rene Lenerve for pointing me the right direction and also for your quick reply!. Its working now.
Your help is much appreciated!
Regards :)