cancel
Showing results for 
Search instead for 
Did you mean: 

STTS22H I2C addressing

nilotnas
Associate II

Hello,

I have started working on the STTS22H and noticed that, at least for my part, the datasheet I2C addressing directive seems to be inverted. Aside from the fact that the datasheet and the evaluation kit have different addressing directives, the evaluation kit seems to have the ADDR pin connected to VDD which would mean the 7-bit address is 0111 000. However, when testing out the sensor it would only respond when using the 7-bit address 0111 111, which is the configuration for when the ADDR pin is connected to ground as pointed out in the snapshot from the datasheet below.

Could that mean that there is an issue with the datasheet or could that be an issue with the kit I have got?

On another unrelated topic, what is the default value of if_add_inc in the CTRL register on boot?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
nilotnas
Associate II

Hi @Eleon BORLINI​ ,

With the STEVAL kit I see 3.27V on the SA0 pin and read/write adresses are 0x7F/0x7E as mentioned above, which is odd right? Now with my custom board, which I was able to test over the weekend, I have SA0 connected to ground and I see the same read/write address (0x7F/0x7E) working.

At this point I'm starting to think that this could just be an issue with my sensor evaluation kit. If the SA0 pin is floating does it have an internal pull-up/down?

Anyways, since I have confirmed that the configuration on my custom board is in line with what the datasheet says I believe I'm good. Thank you for your attention.

View solution in original post

5 REPLIES 5
Eleon BORLINI
ST Employee

Hi @nilotnas​ ,

the datasheet values should be the correct ones: are you facing issue with them?

Please don't consider the ones on the STEVAL kit, we -as ST- should remove these indications indeed.

Please check this other post too, if it can be of any help.

About:

>> On another unrelated topic, what is the default value of if_add_inc in the CTRL register on boot?

As reported in the datasheet, p.10: "The IF_ADD_INC flag inside the CTRL register (11h) enables address auto increment, this flag is set by default to ‘1’, so the auto increment is active".

Hope this can help you.

-Eleon

nilotnas
Associate II

Hi @Eleon BORLINI​,

Thanks for the quick response. I did check the other post before writing this one, however the problem is not quite the same. In the STEVAL kit, the ADDR pin is connected to VDD, which means the write/read address should be 0x70/0x71, correct? However, when I tried this configuration it did not work. The sensor would NACK after the slave address transmission.

After poking around with the addresses I was able to successfully talk to the sensor using the slave write/read address 0x7E/0x7F, which is stated as the slave address for when the ADDR pin is connected to ground. Hence it seems to me that the datasheet has the slave address values switched between VDD and GND or that my STEVAL could have some sort of fault. I would like to understand which one of the issues is happening.

In summary, my STEVAL configuration is:

ADDR Pin connected to VDD and slave address seems to be 0x7E/0x7F, which goes against what the datasheet is saying. It should be 0x70/0x71, but the device won't answer to that.

Attached a pic of the table I'm referencing from the datasheet. 0693W00000AMny9QAD.png

Hi @nilotnas​ ,

uhm... this is strange and I'll report it internally.

But if you otherwise tie the SA0 pin to GND, which I2C address do you see? Can you try this configuration?

-Eleon

nilotnas
Associate II

Hi @Eleon BORLINI​ ,

With the STEVAL kit I see 3.27V on the SA0 pin and read/write adresses are 0x7F/0x7E as mentioned above, which is odd right? Now with my custom board, which I was able to test over the weekend, I have SA0 connected to ground and I see the same read/write address (0x7F/0x7E) working.

At this point I'm starting to think that this could just be an issue with my sensor evaluation kit. If the SA0 pin is floating does it have an internal pull-up/down?

Anyways, since I have confirmed that the configuration on my custom board is in line with what the datasheet says I believe I'm good. Thank you for your attention.

Eleon BORLINI
ST Employee

Hi @nilotnas​ ,

>> At this point I'm starting to think that this could just be an issue with my sensor evaluation kit. If the SA0 pin is floating does it have an internal pull-up/down?

It might be, indeed... The Addr pin should be internally pulled-up.

>> Anyways, since I have confirmed that the configuration on my custom board is in line with what the datasheet says I believe I'm good. 

That's good. Did you have the possibility to test other STEVALs for a check?

-Eleon