lp i2c slave callback does not called

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

lp i2c slave callback does not called

968 Views
adi2Intel
Contributor III

Hi all

we are trying to read data from a system of ours using the NXP evaluation board.

in this system in order to read we need to be i2c slave using the address 0x70 (or 0x38, not sure, try them both)

here is an example of a transaction sniffed using logic analyzer:

adi2Intel_0-1674742014041.png

we are running the SDK example : lpi2c_interrupt_b2b_transfer_slave

we only changed the I2C_MASTER_SLAVE_ADDR_7BIT to 0x38U (and also tried 0x70)

pins we connected : 

adi2Intel_1-1674742253964.png

and GND to J24-7


but the lpi2c_slave_callback does not called. we put breakpoint inside but none of them are called.

the example runs until timeout and finished with an empty slave buffer.

 

what else do we need to do for this to work??

 

Thanks!

Adi 

Intel

0 Kudos
5 Replies

875 Views
adi2Intel
Contributor III

Update: I think this is because of the new flash attached (in the photo). checked with unmodified new Evalutaion Board and works OK.

adi2Intel_0-1677770247394.png

 

what should I change in the code to make this work with the modified board with the flash

0 Kudos

836 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Dear @adi2Intel 

 

Please accept my apologies from my part this time for the delay on my response. I really appreciate your patience.

 

Regarding the issue you are telling me, I think I will need to review your code and modifications you made, because if your another board is configured as master and NXP EVK as Slave, you will need to have a compatible master code on your another board, probably both mcu's are not being configured correctly and that's why they do not interact well each other. HW Connection is too easy, but you will need to be careful with the configuration structures and code.

 

I will highly suggest you to open a new ticket, not in our community, so we can share codes and more information. I will try to handle that ticket on our Support Portal to solve your concerns as soon as possible.

 

Thanks a lot for your collaboration and comprehension.

 

Best Regards.
Pablo Avalos.

0 Kudos

887 Views
adi2Intel
Contributor III

here some photos of the solution. blue wire is SCL and yellow is SDA, green is GND:

adi2Intel_0-1677593895384.png

 

adi2Intel_1-1677593913160.png

 

0 Kudos

941 Views
PabloAvalos
NXP TechSupport
NXP TechSupport

Hi @adi2Intel 

 

Thanks a lot for reaching our technical support. I appreciate your patience.

 

Regarding your issue, I see you are using lpi2c_interrupt_b2b_transfer_slave SDK example, but the one that you have to use if NXP evaluation board is master and want to communicate with a slave, is lpi2c_interrupt_b2b_transfer_master , and correctly modify this #define  I2C_MASTER_SLAVE_ADDR_7BIT to 0x38U (or the slave address your device has in the datasheet, it has to be specified on the write or read section, please be sure of that, and also be sure how much I2C speed is your slave talking, because SDK example works at 400kHZ by default).

 

Hope this information can help you, please let me know if you have more questions.

 

Best Regards.
Pablo Avalos.

0 Kudos

894 Views
adi2Intel
Contributor III

Hi Pablo, sorry for the long delay

the NXP EB is supposed to be the SLAVE. Its connected to another board using I2C and should read "Post Codes" from I2c address 0x70. this other board writes the post codes to this address and the NXP should read it

the callback never called.

 

some photos:

adi2Intel_0-1677596901432.pngadi2Intel_1-1677596909487.png

 

adi2Intel_2-1677596916249.png

 

0 Kudos