Hi,
I am trying to use PN7120 with Intel Edison and Yocto kernel 3.10.17.
I configured platform data, GPIO and I2C.
When I start ./linux_libnfc-nci/nfcDemoApp poll
#########################################################################################
## NFC demo ##
#########################################################################################
## Poll mode activated ##
#########################################################################################
... press enter to quit ...
NxpHal: Entering phNxpNciHal_init_monitor
NxpHal: Returning with SUCCESS
NxpTml: Opening port=/dev/pn544
NxpTml: phTmlNfc_i2c_reset(), VEN level 1
NxpTml: phTmlNfc_i2c_reset(), VEN level 0
NxpTml: phTmlNfc_i2c_reset(), VEN level 1
NxpTml: PN54X - Tml Reader Thread Started................
NxpTml: PN54X - Tml Writer Thread Started................
NxpTml: NxpHal: NxpTml: PN54X - Tml Writer Thread Running................
PN54X - Read requested.....
PN54X - Tml Writer Thread Running................
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: PN54X - Tml Writer Thread Running................
NxpHal: write error status = 0x1ff
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: PN54X - Tml Writer Thread Running................
NxpHal: write error status = 0x1ff
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: NxpHal: write error status = 0x1ff
PN54X - Tml Writer Thread Running................
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: PN54X - Tml Writer Thread Running................
NxpHal: write error status = 0x1ff
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: PN54X - Tml Writer Thread Running................
NxpHal: write error status = 0x1ff
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode - Retry
NxpTml: PN54X - Write requested.....
NxpTml: PN54X - Invoking I2C Write.....
NxpTml: _i2c_write() errno : 5
NxpTml: PN54X - Error in I2C Write.....
NxpTml: PN54X - Posting Fresh Write message.....
NxpTml: PN54X - Tml Writer Thread Running................
NxpHal: write error status = 0x1ff
NxpHal: write_unlocked failed - PN54X Maybe in Standby Mode (max count = 0x6)
NxpTml: phTmlNfc_i2c_reset(), VEN level 1
NxpTml: phTmlNfc_i2c_reset(), VEN level 0
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpTml: phTmlNfc_i2c_reset(), VEN level 1
NxpTml: _i2c_read() [hdr] errno : 79
NxpTml: PN54X - Error in I2C Read.....
NxpTml: PN54X - Read requested.....
NxpTml: PN54X - Invoking I2C Read.....
NxpHal: PN54X Reset - SUCCESS
NxpHal: phNxpNciHal_write failed for hal ext
NxpHal: Force FW Download, NFCC not coming out from Standby
Kernel output :
[ 1248.409304] pn54x_dev_open : 10,56
[ 1248.409460] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1248.409479] pn544_enable power on
[ 1248.613417] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1248.613441] pn544_disable power off
[ 1248.823398] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1248.823422] pn544_enable power on
[ 1248.934225] pn54x_dev_read: spurious interrupt detected
[ 1248.942949] pn54x_dev_write : i2c_master_send returned -121
[ 1248.951578] pn54x_dev_write : i2c_master_send returned -121
[ 1248.959695] pn54x_dev_write : i2c_master_send returned -121
[ 1248.967473] pn54x_dev_write : i2c_master_send returned -121
[ 1248.975172] pn54x_dev_write : i2c_master_send returned -121
[ 1248.983654] pn54x_dev_write : i2c_master_send returned -121
[ 1248.990141] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1248.990161] pn544_enable power on
[ 1249.193330] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1249.193353] pn544_disable power off
[ 1249.204157] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.210915] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.217631] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.224367] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.231203] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.237923] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.244779] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.251477] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.258134] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.264821] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.271487] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.278143] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.284843] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.291519] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.298173] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.304854] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.311517] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.318171] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.324858] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.331524] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.338175] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.344851] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.351520] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.358173] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.364846] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.371507] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.378157] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.384841] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.391509] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.398159] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.402951] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1249.402972] pn544_enable power on
[ 1249.404837] pn54x_dev_read: i2c_master_recv returned -121
[ 1249.410498] pn54x_dev_read: spurious interrupt detected
[ 1344.561123] pn54x_dev_release : closing 10,56
Do you have any idea about this errors ?
Hello Bryan,
According to above logs, I feel there are 2 possibilities for the issue:
(1) Didn't load linux driver of PN7120.
When you configure linux kernel by "make menuconfig" command, did you select it's driver ?
(2) Checking device tree
Check device tree of your board , please ! PN7120 is I2C device, so it should be mounted corresonding I2C bus(such as I2C1/2/3 etc)
After BSP and linux driver are both loaded correctly, you will find PN7120 device in path /dev/, only the step is finished, DemoAPP can be run successfully.
Due to no debugging conditions, so we can only give you some advice. Hope above suggestions are able to help you solve the issue.
Regards,
weidong
NO the device namw should be /dev/pn544. it will never be pn7120.
Check in all porting guide