Reading an I2C slave register in TWRK65F180MUG

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

Reading an I2C slave register in TWRK65F180MUG

跳至解决方案
693 次查看
sameerchouksey
Contributor I

Hi,

I am trying to read 2 bytes from an I2C slave device register with following addresses.

Lets say slave address = 0x68

Register = 0x4a

 

I am using I2C_DRV_MasterReceiveDataBlocking() api from sample I2C master app KSDK_1.3.0. to read I2C slave data.

 

I am giving slave address in i2c_device_t slave =
{
.address = 0x68, 
.baudRate_kbps = 100
};  

but can not locate any option or argument to enter the slave register address.

 

Kindly help me understand how do I set the slave register address..??

 

Thanks

twrk65f180m i2c

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
520 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Please refer the "read_accel_value_transfer" example in SDK_2.1_TWR-K65F180M.

i2c driver_examples in SDK_2.1_TWR-K65F180M.PNG

Select TWR-K65F180M then download SDK_2.1_TWR-K65F180M.

Select TWR-K65F180M.PNG

download SDK_2.1_TWR-K65F180M.PNG
You can getting start with KSDK reading "How to start with KSDK".

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
---------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

0 项奖励
回复
1 回复
521 次查看
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Please refer the "read_accel_value_transfer" example in SDK_2.1_TWR-K65F180M.

i2c driver_examples in SDK_2.1_TWR-K65F180M.PNG

Select TWR-K65F180M then download SDK_2.1_TWR-K65F180M.

Select TWR-K65F180M.PNG

download SDK_2.1_TWR-K65F180M.PNG
You can getting start with KSDK reading "How to start with KSDK".

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
---------------------------------------------------------------------------------------------------------------------

0 项奖励
回复