s32k144 use i2c write eerom

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

s32k144 use i2c write eerom

1,201 次查看
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 回复

759 次查看
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