Reading an I2C slave register in TWRK65F180MUG

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading an I2C slave register in TWRK65F180MUG

Jump to solution
259 Views
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

Labels (1)
Tags (2)
0 Kudos
1 Solution
86 Views
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!
---------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
87 Views
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!
---------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos