PN7120 driver error : "pn54x_dev_write : i2c_master_send returned -5. When probe with scope, it seems that sometime, it is ACK the write from DH.

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

PN7120 driver error : "pn54x_dev_write : i2c_master_send returned -5. When probe with scope, it seems that sometime, it is ACK the write from DH.

2,591 Views
frank689
Contributor I

Hi I have integrated PN7120 Linux driver and HAL base on AN11690. I run the NXP test apk. It is able scan and discovered the NFC credit card. However, every once awhile, I'm getting the following errors from the driver. "pn54x_dev_write : i2c_master_send returned -5. When I probe i2c bus with scope, it seems that sometimes, it is response ACK on i2c write access. 

0 Kudos
Reply
1 Reply

1,681 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Frank,

Error code "-5" relates to generic errno definition EIO (I/O error). Refer to errno.h - C Error Codes in Linux for more details.

Looking to the pn5xx_i2c module implementation (nxp-pn5xx/pn5xx_i2c.c at master · NXPNFCLinux/nxp-pn5xx · GitHub ), this error code is raised by the kernel I2C driver (i2c_master_send).

In a specific case, the PN7120 is not answering to I2C write command: when it is in standby state. This is expected behavior, first write command waking-up the PN7120 and second one will be answered. The MW stack (Linux or Android stack) is managing the re-transmission of the frame to handle this case.


Hope that helps,
Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply