Skip to main content
Visitor II
November 5, 2018
Solved

I2C read/write sample C program for ST25DV.

  • November 5, 2018
  • 1 reply
  • 4486 views

I would like a sample code C program or even a list a commands that I need to use for reading and writing to the nfc tag. (ST25DV) via I2c. Are the commands similar to M24SR?@

Thanks

@Berenice BENVEGUDA​  @brk​ 

    This topic has been closed for replies.
    Best answer by JL. Lebon

    ​Dear Anish,

    ST25DV and M24SR have different I2C comands.

    The ST25DV memory and system configration are accessed by simple byte addressing, just like standard EEPROMs. If you have C code for standard EEPROM, then the code to access ST25DV would be quiet similar.

    Basically, ST25DV supports four I2C commands: I2C write, I2C read, I2C present password and I2C write password.

    You can find explanation of ST25DV 's I2C commands in the datasheet, at chapter 6 (page 58). See datahseet at https://www.st.com/resource/en/datasheet/st25dv04k.pdf

    You can find C source code example for STM32 microcontroller in the ST25DV Discovery kit SW at following link https://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25dv001.html

    Or C source code  example for the nucleo extension board X-NUCLEO-NFC04A1 board (STM32cube) at following link https://www.st.com/content/st_com/en/products/ecosystems/stm32-open-development-environment/stm32-nucleo-expansion-boards/stm32-ode-connect-hw/x-nucleo-nfc04a1.html

    Hope this helps you.

    Best regards.

    1 reply

    JL. LebonAnswer
    ST Employee
    November 6, 2018

    ​Dear Anish,

    ST25DV and M24SR have different I2C comands.

    The ST25DV memory and system configration are accessed by simple byte addressing, just like standard EEPROMs. If you have C code for standard EEPROM, then the code to access ST25DV would be quiet similar.

    Basically, ST25DV supports four I2C commands: I2C write, I2C read, I2C present password and I2C write password.

    You can find explanation of ST25DV 's I2C commands in the datasheet, at chapter 6 (page 58). See datahseet at https://www.st.com/resource/en/datasheet/st25dv04k.pdf

    You can find C source code example for STM32 microcontroller in the ST25DV Discovery kit SW at following link https://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/stsw-st25dv001.html

    Or C source code  example for the nucleo extension board X-NUCLEO-NFC04A1 board (STM32cube) at following link https://www.st.com/content/st_com/en/products/ecosystems/stm32-open-development-environment/stm32-nucleo-expansion-boards/stm32-ode-connect-hw/x-nucleo-nfc04a1.html

    Hope this helps you.

    Best regards.

    Visitor II
    August 23, 2023

    Hi, 

    I am using ST25DV16KC . If we go through Device select codes ,it shows address in 8 bit format(along with Read and Write bit)

    If I have to neglect the read/write bit, then will the address be in this format or not
    A6 : 1010 0110b - with read and write bit
    53 : 101 0011b - without read and write bit