I2C interface with S32k146 temperature sensor (TMP1075)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

I2C interface with S32k146 temperature sensor (TMP1075)

6,693 Views
Jeevitha
Contributor II

I am trying to interface the temperature sensor(TMP1075) slave address- (0x49). I am not able to read the temperature value. I am getting a 00 value consistently. I have attached my code please help me. I am new to this board.

Labels (1)
0 Kudos
Reply
9 Replies

6,624 Views
Jeevi
Contributor I

Hi, @VaneB to read the value of the temperature sensor, I shifted the slave address. I am able to communicate the same TMP1075 with other development boards I am not able to communicate with the S32K146 board. Once again can you check with my code?

0 Kudos
Reply

6,615 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevi 

Our driver supports 10-bit and 7-bit slave address sizes. In the case of 7 bits, our driver does the bit shift, so you do not have to do it.

VaneB_0-1696612959428.png

 

0 Kudos
Reply

6,579 Views
Jeevi
Contributor I

HI @VaneB Thanks for the information. I have changed the slave address. Now also I am not able to read the temperature value from the sensor.

0 Kudos
Reply

6,568 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevi 

Could you provide an image of the I2C frame? 

0 Kudos
Reply

6,662 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevitha 

I have a question about why you shifted the slave address.

The communication from the S32K1 looks correct. So, I suggest you contact your device supplier to verify the required process and steps to work with the sensor. 

 

B.R.

VaneB

0 Kudos
Reply

6,398 Views
Jeevi
Contributor I

Hi @VaneB I am using the lpi2c_master program I want to test the i2c communication so I am using the development board as master and the temperature sensor as slave. I want to read the data from the register(0x01). I am not able to read the temperature value from the sensor. I have tried many methods but it is not working. Can you please help me? I have attached the frame format also.

0 Kudos
Reply

6,353 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevi 

Check section 3.1.12 (Reserved addresses) of the I2C-bus specification and user manual. This document mentions that the address 0000 001 is included.

Please verify the address required for your external device with your device distributor.

0 Kudos
Reply

6,330 Views
Jeevi
Contributor I

Hi @VaneB Thank you for the information. Can you please provide an example code for measuring the temperature data from the sensor?

0 Kudos
Reply

6,315 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevi 

The examples we provide for I2C are the ones provided with the SDK and RTDs, and also the is one in the following link:

S32K Examples

0 Kudos
Reply