I2C bus error - PN532

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
ut1545
Normal user
Posts: 32
Joined: 22 Mar 2016, 20:56

I2C bus error - PN532

#1 Post by ut1545 » 15 Apr 2021, 19:22

I have a self built ESP8266 with a PN532 connected to it that has worked for months. After some hardware modifications, I have updated ESPEasy from build 20191127 to the last one. After that, when I turned on and off several times a low power light (5W), the PN532 stops working until it is reset through RSTPDN pin.

In the build 20191127, ESPEasy can detect this situation as "BUS Error" and reset PN532 automatically as you can see in the following log:

But with newer versions, the software doesn't detect this error and the PN532 can't read a tag anymore. I have tested several newer versions with the same results.

Does anyone have had a similar issue? Is this a bug?
Attachments
Screenshot from 2021-04-15 18-08-59.png
Screenshot from 2021-04-15 18-08-59.png (171.19 KiB) Viewed 5679 times

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: I2C bus error - PN532

#2 Post by ThomasB » 16 Apr 2021, 19:48

This old Github ticket explains the PN532 Bus Error bug: https://github.com/esp8266/Arduino/issues/1541

As noted in the ticket, the issue may be solved via the clock stretching value. In case it helps you, try changing Tools->Advanced->I2C ClockStretchLimit to 2000.

BTW, I don't use the PN532. So I cannot test this.

- Thomas

ut1545
Normal user
Posts: 32
Joined: 22 Mar 2016, 20:56

Re: I2C bus error - PN532

#3 Post by ut1545 » 18 Apr 2021, 16:42

Thank you Thomas,

I will do some tests to see if adjusting Stretch Limit could resolve this issue.

BTW, I think that if older versions can detect bus errors, the newer ones could do the same. May be the right thing to do is open an issue or PR in GitHub....

Antonio,

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 13 guests