lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

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

lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

1,259 次查看
rs__zen
Contributor I

Hi

I'm trying to use EEPROM(24FC64) by using LPI2C_MasterTransferNonBlocking function.

I can write data to EEPROM, but I cannot to access Random Read(pls see attached).

How do you do a dummy write and subsequent read using LPI2C_MasterTransferNonBlocking?

 

Thank you.

ss.png

标签 (1)
0 项奖励
回复
3 回复数

1,213 次查看
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @rs__zen 

 

I would like to apologize for the delay. We are overloaded on the requests these days. I truly appreciate your patience.

 

Regarding your question, personally I would suggest you to use LPI2C_MasterTransferBlocking, because non-blocking function is going to read/write just one byte every time that it is being called and not the full message that you want to read/write on your EEPROM. It happened to me twice.

Also, can you please explain me what is your intention for doing a dummy write?

 

I will stay tuned to your answer, please let me know if you have more questions.

 

Thank you.
Sincerely,
Pablo Avalos.

0 项奖励
回复

1,203 次查看
rs__zen
Contributor I

Hi PabloAvalos.

Thank you for your answer.

 

Dummy write means that it is write command without write bytes.

I feel it could be done by setting up the following.

lpi2c_master_transfer_t masterXfer;
memset(&masterXfer, 0, sizeof(masterXfer));
uint8_t dummyBuf[1] = {0};
masterXfer.data = dummyBuf;
masterXfer.dataSize = 0;

So,I send dummy write command and read command,  I could random read access with EEPROM using LPI2C_MasterTransferNonBlocking.

 

I will ask again if problems arise.
 
 
Thank you.
Sincerely,
rs__zen
0 项奖励
回复

1,199 次查看
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @rs__zen 

 

Thanks a lot for letting us know with your reply.

 

If you still require further help, please create a new post refering to this thread. We will be more than glad to help you.

 

Best Regards.
Pablo Avalos.

0 项奖励
回复