Slave addressing as I2C Master

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

Slave addressing as I2C Master

2,083件の閲覧回数
jeremiahg
Contributor III

I am looking for some clarification using the I2C component for the S32K144. I currently have my Component Inspector set to:

 

168505_168505.pngpastedImage_2.png

 

I have separately established communications with configuration 0 and configuration 1. I'm not exactly sure how NXP intended us to communicate to each slave when multiple slaves are present. It looks like the functions present in the Kinetis line of Processor Expert pass the Config along with the data for sending and receiving. That is not present on the S32K.

 

I have a semaphore set up which uses the LPI2C_DRV_MasterSetSlaveAddr function to switch the address so I can communicate with each slave. Another option would be to Deinit, then Init with the Config that contains the desired slave address. What was NXP intending to do here?

 

It is possible that the I2C module is still being development.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

1,636件の閲覧回数
cristianzamfire
NXP Employee
NXP Employee

    Hello Jeremiah,

    You are right, in order to communicate with another slave you must call LPI2C_DRV_MasterSetSlaveAddr() with the new slave address. After this, all transfers will use this address, until the next call to LPI2C_DRV_MasterSetSlaveAddr().
    It is also possible to call Deinit and then Init again with a new configuration, but this would consume much more processing time.

    Best regards,
    Cristian

0 件の賞賛
返信