lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

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

lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

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

Labels (1)
0 Kudos
3 Replies

950 Views
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 Kudos

940 Views
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 Kudos

936 Views
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 Kudos