external I2C component with PE

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

external I2C component with PE

1,427件の閲覧回数
syed_idris
Contributor III

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

ラベル(1)
タグ(2)
7 返答(返信)

1,159件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello syed,

Which chip do you used ?

I recommend you can fist check these basic demo code :

pastedImage_0.png

Hope it helps

Alice

0 件の賞賛
返信

1,159件の閲覧回数
syed_idris
Contributor III

Hi Alice,
I am using KL03 chip and fsl_i2c component, and I didn't get that "typical usage" in "help on component"

Capture.PNG

Idris

0 件の賞賛
返信

1,159件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

1,159件の閲覧回数
syed_idris
Contributor III

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

0 件の賞賛
返信

1,159件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Syed,

How about the function of "I2C_DRV_MasterReceiveDataBlocking()" ?

BR

Alice

0 件の賞賛
返信

1,159件の閲覧回数
syed_idris
Contributor III

Alice,

"I2C_DRV_MasterReceiveDataBlocking()" function is also responding same for 2 bytes reading.

0 件の賞賛
返信

1,159件の閲覧回数
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Syed,

I checked you have the same question  on another thread , i will reply you on that one .

Hope it helps

Alice