OM27160A1EVK Raspberry Pi i2c cannot detect using i2cdetect -y 1

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

OM27160A1EVK Raspberry Pi i2c cannot detect using i2cdetect -y 1

2,116 Views
KennyG
Contributor I

After getting the demo software to compile and run on a Pi Zero 2 W the service won't start.  Upon attempting to debug I determined that at a minimum the eval board stack for the Raspberry Pi is not detected on the i2C bus.  I have another device that I have connected to the sda and scl lines and it is detected when running  i2cdetect.  I checked with a meter that the correct i2c lines from the eval board are connected correctly to the same i2c pins so I would expect that I would be able to see either a '50' or '51' per the datasheet on the i2c bus.

 

Anyone else have this issue?

 

Thanks

--Ken

0 Kudos
Reply
10 Replies

1,986 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello @KennyG , 

I think your problem can be related with this topic :

 

https://community.nxp.com/t5/NFC/OM27160-raspberry-i2c-NfcService-Init-Failed/m-p/1825250/thread-id/...

 

I will report it to our RnD team, that support for latest Raspberries is needed. 

BR

Tomas 

0 Kudos
Reply

1,945 Views
KennyG
Contributor I

Here is the log file output from running it with the failure.  Looks like the interrupt is not working correctly to me.  

 

Thanks

--Ken

0 Kudos
Reply

1,920 Views
KaiLi
NXP TechSupport
NXP TechSupport

Hello @KennyG 

Let's follow the comments of Tomas, if has the final result, he will update this post https://community.nxp.com/t5/NFC/OM27160-raspberry-i2c-NfcService-Init-Failed/m-p/1825250/thread-id/...

So please pay attention it, thanks.

0 Kudos
Reply

1,969 Views
KennyG
Contributor I
Thomas,
First, a question. How do I turn on logging in the build? I started putting printf's in just as a easy way to see what is happening when it fails to get the JNI service started but there is already a ton of logging throughout the code so that would be easiest to see. It does appear that the GPIO initialization code succeeds so at least it 'thinks' it will be able to talk to the GPIO pins.

If you do get in touch with the RnD dept let them know that I'll be happy to help debug and figure this out with them. I'm a little rusty with my linux kernel driver stuff but in a past life I did do device drivers for quite a while.

Thanks,
--Ken
0 Kudos
Reply

2,028 Views
KennyG
Contributor I

I referred to the ap note mentioned above, rebuilt again and still have the following problem.  I am using the second method which uses /dev/i2c-1.  What I see is that the 'enable' line is never getting set HIGH so the unit is just not responding.  The pin #'s are set correctly in the appropriate files though.

 

KennyG_0-1731359815331.png

 

0 Kudos
Reply

2,005 Views
KaiLi
NXP TechSupport
NXP TechSupport

Hello @KennyG 

From the logic of I2C, the communication is abnormal between pi and PN7160, I also have tested on my side everything works fine. So, it's recommended that you should check the connection between pi and PN7160. The below I2C time logic is from my side for your reference.

KellyLi_0-1731494404111.png

 

0 Kudos
Reply

1,947 Views
KennyG
Contributor I

I've attached the log file from the failure.  Does this shed any insight on the problem.  To me it seems that the interrupt is not happening as it should.

 

Thanks

--Ken

0 Kudos
Reply

1,967 Views
KennyG
Contributor I

Kelly,

 

If I force the enable line high the I2C communication happens as it should so there is no connection issue between the Pi and the 7160.  

0 Kudos
Reply

2,061 Views
KaiLi
NXP TechSupport
NXP TechSupport

Hello @KennyG 

Please refer AN13287 (https://www.nxp.com.cn/docs/en/application-note/AN13287.pdf) to build your device, and try the test again.

0 Kudos
Reply

2,086 Views
KennyG
Contributor I
Quick Update. The VEN line is connected to GPIO 24 on the raspberry pi. In the reset condition this appears to be pulled low (reset). If I set the bit to 'hi' and then do the "i2cdetect -y -a 1" command I see a device respond with a address of 7c. This does not appear to match up with the datasheet where the addresses can range from 50 to 57. I still get the message below when running the demo app.

NfcService Init Failed
Leaving ...
0 Kudos
Reply