s32k144 use i2c write eerom

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

s32k144 use i2c write eerom

1,147件の閲覧回数
jiangbolwj
Contributor II

i want using i2c to write eerom,but i do not find a SDK  library function ,I need to give a specific address information to the saver,

also i need read  a specific address information  from the saver,but the LPI2C_DRV_MasterReceiveData can not do this,  i do not know which function could using ,could you help me 

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

705件の閲覧回数
raresvasile
NXP Employee
NXP Employee

Hi,

1) In order to send the data you need to use:

   LPI2C_DRV_MasterSendDataBlocking(instance, txBuffer, txSize, true, timeout);

2) To receive data from a specific address you need first to send the command without sending stop and then requesting the required amount of data(This operation will send a repeated start on the bus). E.g.

   LPI2C_DRV_MasterSendDataBlocking(instance, txBuffer, txSize, false, timeout);

   LPI2C_DRV_MasterReceiveDataBlocking(instance, rxBuffer, rxSize, true, timeout);

Please fill the instance, txBuffer, txSize, timeout, rxBuffer and rxSize parameters according to your application.

Best regards,

Rares