cancel
Showing results for 
Search instead for 
Did you mean: 

Hello I am having trouble communicating with my st25dv04k.

HKhan.4
Associate II

The library i'm using has simple read and write operations and i'm struggling to comprehend how the device function code works. I am simply trying to read the IC ref register. To do so,I use the device select code '0xAF - 1010 1111b - System memory reading". The start condition is included in the write operations.

Question 1:

I would need to send the device select code(in a buffer) to my i2c device. What address am I sending it to?

Question 2

The next step is to read the IC ref register (0x17). My understanding is that the address i'm reading is 0x17.

So far I cant send the device select code to my device and I can't understand why.

Please assist if possible.

Kind regards,

Hassan

1 ACCEPTED SOLUTION

Accepted Solutions
JL. Lebon
ST Employee

Hello,

I'm not sure to understand your first question. but let me try to answer the second one (and may be it will answer the first one as well).

If you want to read the IC ref register, your I2C command must look like this:

Start/AE/ack/00/ack/17/ack/Start/AF/ack/ICRef/Nack/Stop

The first device select code AE indicated a write in System memory

It is followed by the address of the register ICRef 0017, coded on 2 Bytes.

Then, you have to de a Start again (or alternatively, a Stop, and then a Start again)

After the second start, the Read device select code is sent (AF) and the next Byte will be the IC Ref returned by the ST25DV.

This is all explained in the datasheet in chapter "6.5 I2C read operations". Check the random read address command. I recommend to read the chapter 6 I2C operation from the datasheet to better understand how to address the ST25DV.

Best regards.

View solution in original post

1 REPLY 1
JL. Lebon
ST Employee

Hello,

I'm not sure to understand your first question. but let me try to answer the second one (and may be it will answer the first one as well).

If you want to read the IC ref register, your I2C command must look like this:

Start/AE/ack/00/ack/17/ack/Start/AF/ack/ICRef/Nack/Stop

The first device select code AE indicated a write in System memory

It is followed by the address of the register ICRef 0017, coded on 2 Bytes.

Then, you have to de a Start again (or alternatively, a Stop, and then a Start again)

After the second start, the Read device select code is sent (AF) and the next Byte will be the IC Ref returned by the ST25DV.

This is all explained in the datasheet in chapter "6.5 I2C read operations". Check the random read address command. I recommend to read the chapter 6 I2C operation from the datasheet to better understand how to address the ST25DV.

Best regards.