Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C: Rewrite PN532 drive code to use IRQ lines over GPIO #239

Open
omeh-a opened this issue Sep 9, 2024 · 0 comments
Open

I2C: Rewrite PN532 drive code to use IRQ lines over GPIO #239

omeh-a opened this issue Sep 9, 2024 · 0 comments
Labels
driver-examples Issues related to examples for drivers for a target meson Devices on a Meson platform - e.g. ODROID C4

Comments

@omeh-a
Copy link
Member

omeh-a commented Sep 9, 2024

Presently, the polling-mode I2C driver for the PN532 card reader works by constantly polling the device. This presents numerous issues however, with every single read being accompanied by over 1000 timeout errors and 10-50 I2C NACKs. Unfortunately both of these issues are simply due to poor design in the firmware of the PN532 itself and we can do little to remedy it.

In order to reduce the quantity of errors produced to a reasonable level, this issue proposes changing the PN532 code in the sDDF examples / LionsOS to only poll the device in response to an IRQ. The PN532 exposes an IRQ line which can be connected to target devices using GPIO. By only polling when the device is ready, the I2C driver won't be flooded with bad requests at all times.

@omeh-a omeh-a added meson Devices on a Meson platform - e.g. ODROID C4 driver-examples Issues related to examples for drivers for a target labels Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
driver-examples Issues related to examples for drivers for a target meson Devices on a Meson platform - e.g. ODROID C4
Projects
None yet
Development

No branches or pull requests

1 participant