I have purchased a PN7160 based Evalution board OM27160B1HN with SPI support. I have followed the instructions based on this AN12991 document and interfaced it with raspberry pi 4B, But getting a "NfcService init failed" error as shown in attached image. Please guide to solve this issue
Hello @danielchen we have developed our own custom board based on PN7160 with SPI configuration and the board-bring up is successful but still its not detecting any tags. I am attaching the logs for the reference. Awaiting quick response. Thank you
regards,
Dharmit M
Hi @Dharmit_m
I assume you are using 64-bit OS. please apply the patch as attached. and try it again.
If you have other issues, please enable all logs and share log with us.
Regards
Daniel
@danielchen thanks for reply, I am using below version of OS and kindly explain how to enable logs in raspberry pi
Thanks
Hi @Dharmit_m
Please check the configuration file libnfc-nxp.conf
###############################################################################
# Logging Levels. Suggested value for debugging is 0x03.
# NXPLOG_GLOBAL_LOGLEVEL - Configuration for Global logging level
# NXPLOG_EXTNS_LOGLEVEL - Configuration for extns logging level
# NXPLOG_NCIHAL_LOGLEVEL - Configuration for enabling logging of HAL
# NXPLOG_NCIX_LOGLEVEL - Configuration for enabling logging of NCI TX packets
# NXPLOG_NCIR_LOGLEVEL - Configuration for enabling logging of NCI RX packets
# NXPLOG_FWDNLD_LOGLEVEL - Configuration for enabling logging of FW download functionality
# NXPLOG_TML_LOGLEVEL - Configuration for enabling logging of TML
# Logging Levels
# NXPLOG_DEFAULT_LOGLEVEL 0x01
# NXPLOG_DEBUG_LOGLEVEL 0x03
# NXPLOG_WARN_LOGLEVEL 0x02
# NXPLOG_ERROR_LOGLEVEL 0x01
# NXPLOG_SILENT_LOGLEVEL 0x00
NXPLOG_EXTNS_LOGLEVEL=0x03
NXPLOG_NCIHAL_LOGLEVEL=0x03
NXPLOG_NCIX_LOGLEVEL=0x03
NXPLOG_NCIR_LOGLEVEL=0x03
NXPLOG_FWDNLD_LOGLEVEL=0x03
NXPLOG_TML_LOGLEVEL=0x03
configure them to 0x03
Regards
Daniel
Hi
From your log message, you can see you are using I2C , not SPI. I would suggest you check it.
Regards
Daniel
as shown in the same log it is trying to initialize SPI at dev/spidev0.0 and setting nxp transport at 0x03 which is SPI as per libnfc-nxp.conf file settings and also the physical hardware interface is SPI only and the Evalution board is OM27160B1HN which is SPI configured during chip manufacturing. please provide the reference log with SPI if it is working properly to narrow down the issue.
Hi @Dharmit_m
Are you using the integrated driver or nxp driver? can you share the configuration file ?
Regards
Daniel
Hi @Dharmit_m
Can you try to run NfcFactoryTest application?
Did you enabled the SPI in raspberry PI config?
Regards
Daniel
Got to know that the Nfcc Transport is common code for both nxpnfc I2C and SPI driver so that answers my question "Why is it reporting I2C write when I am using SPI ?"
However the issue is still there. Getting Write errors.
@danielchen here is a attached screenshot containing factory test application log, and spi configuration of raspberry pi.
@Dharmit_m, is it working for you now ?