s32k144 use i2c write eerom

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

s32k144 use i2c write eerom

1,180 Views
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 

Labels (1)
0 Kudos
1 Reply

738 Views
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