Hi,
We didn't find any example for I2C component for external components connected to Kinetis with PE. while going through fsl_i2c component I am getting confuse between I2C mode selection as master or slave,this mode selection is as per controller side or device side?
means if I am connecting I2C component to Kinetis controller (Controller as master and device as slave) then I have to select I2C master mode, am I correct?
in component inspector for master mode we have to write address of slave?
where to define the slave data register which I want to read from slave?
I2C example with PE is also appreciated.
Idris
Hello syed,
Which chip do you used ?
I recommend you can fist check these basic demo code :
Hope it helps
Alice
Hi Alice,
I am using KL03 chip and fsl_i2c component, and I didn't get that "typical usage" in "help on component"
Idris
Hello syed,
Yes, under KSDK , there is no PE demo, you can refer to
the sample under KSDK installation directory :
KSDK_1.3.0\examples\frdmkl03z\driver_examples\i2c
Hope it helps
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Alice_Yang , DavidS
I tried with that example code and made one simple project but it is not responding correctly,
I want to read 2 bytes from register 0x05 of slave (device address: 0x18).
please have a look to a project and suggest how to read slave device,
Should I call I2C_DRV_MasterReceiveData() or I2C_DRV_MasterReceiveDataBlocking() function?
Is there something wrong in I2C_DRV_MasterReceiveData() function calling parameters?
Output:
Before : 1 ff
After : 1 ff
Idris
Hello Syed,
How about the function of "I2C_DRV_MasterReceiveDataBlocking()" ?
BR
Alice
Alice,
"I2C_DRV_MasterReceiveDataBlocking()" function is also responding same for 2 bytes reading.
Hello Syed,
I checked you have the same question on another thread , i will reply you on that one .
Hope it helps
Alice