I2C interface with S32k146 temperature sensor (TMP1075)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I2C interface with S32k146 temperature sensor (TMP1075)

6,702 次查看
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.

标签 (1)
0 项奖励
回复
9 回复数

6,633 次查看
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 项奖励
回复

6,624 次查看
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 项奖励
回复

6,588 次查看
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 项奖励
回复

6,577 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @Jeevi 

Could you provide an image of the I2C frame? 

0 项奖励
回复

6,671 次查看
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 项奖励
回复

6,407 次查看
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 项奖励
回复

6,362 次查看
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 项奖励
回复

6,339 次查看
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 项奖励
回复

6,324 次查看
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 项奖励
回复