Skip to main content
Visitor II
November 4, 2022
Solved

st25dv04k address to send

  • November 4, 2022
  • 5 replies
  • 1175 views

Good day 

I am currently trying to get a st25dv04k running on an nrf9160dk using i2c. At the moment i'm having trouble 'waking' up the slave as i'm not sure what address to send the startup condition to. Please assist if possible.

Thank you

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

    Hi,

    Actually, what you call the devSelCode is the slave address. It is coded on 7 bits and you have to add the LSB bit to 0 or 1 depending if you want to do a read or a write. This is how I2C works.

    Here is the I2C signals with the values you should put in bits:

    0693W00000WI1WNQA1.pngBest reagrds.

    5 replies

    ST Employee
    November 7, 2022

    Hello,

    You can find this information in the datasheet, on chapter "6.3 Device addressing"

    The ST25DV04K has tow I2C slave addresses:

    • A7/A6 to access the user memory (A7 to read and A6 to write)
    • AF/AE to access the system memory (AF to read, Ae to writer).

    Best regards.

    HKhan.4Author
    Visitor II
    November 9, 2022

    Thank you!

    so I would write the device selection code to A6?

    ST Employee
    November 9, 2022

    Yes if you want to write into user memory.

    Your I2C command would look like this

    Start/0xA6/Ack/MSB of memory address/Ack/LSB of memory address/Ack/your data.../Ack/Stop

    Best regards.

    HKhan.4Author
    Visitor II
    November 10, 2022

    HI again

    My intention is to just try and receive an ACK bit back from the device to prove that the connection exists. So just for clarity , I need to write devSelCode[8] = {1, 0, 1, 0, 0, 1, 1, 0}; to which slave address ?

    JL. LebonAnswer
    ST Employee
    November 10, 2022

    Hi,

    Actually, what you call the devSelCode is the slave address. It is coded on 7 bits and you have to add the LSB bit to 0 or 1 depending if you want to do a read or a write. This is how I2C works.

    Here is the I2C signals with the values you should put in bits:

    0693W00000WI1WNQA1.pngBest reagrds.