lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

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

lpi2c using LPI2C_MasterTransferNonBlocking for EEPROM

1,297件の閲覧回数
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,251件の閲覧回数
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,241件の閲覧回数
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,237件の閲覧回数
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 件の賞賛
返信