LPI2C

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

LPI2C

713件の閲覧回数
LzdOo
Contributor III

I want to use the LPI2C module of S32K144 as the Master to communicate with the Slave and achieve register reading and writing. As shown in the configuration and interface diagram, it seems that they are not effective. Could you please tell me which step is missing? (The Slave address is correct.)

LzdOo_0-1752043406192.png

LzdOo_1-1752043429981.png

LzdOo_2-1752043450249.png

 

 

 

タグ(1)
0 件の賞賛
返信
3 返答(返信)

694件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

the setting looks normal and code is almost right. If using non-blocking function you should check for transfer finish, before other Send/Receive is called. Non-blocking operations will initiate the transfer and return STATUS_SUCCESS, but the module is still busy with the transfer and another transfer can't be initiated until the current transfer is complete. The application can check the status of the current transfer by calling LPI2C_DRV_MasterGetTransferStatus().
Or use blocking function instead.

BR, Petr

0 件の賞賛
返信

683件の閲覧回数
LzdOo
Contributor III

Hi, Petr

The code has been modified as follows, but the SDA and SCL waveforms are incorrect. Please help me figure out what the reason is.

LzdOo_0-1752113059672.png

LzdOo_1-1752113169873.png

LzdOo_2-1752113292012.png

 

0 件の賞賛
返信

671件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

but you did not implement what was written. Modify code additionally to either put  Transfer status testing after MasterSendData function or use MasterSendDataBlocking there.

BR, Petr

0 件の賞賛
返信