I2C: Rewrite PN532 drive code to use IRQ lines over GPIO #239
Labels
driver-examples
Issues related to examples for drivers for a target
meson
Devices on a Meson platform - e.g. ODROID C4
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.
The text was updated successfully, but these errors were encountered: