adafruit / Adafruit_CircuitPython_STMPE610

Adafruit CircuitPython driver for the STMPE610 resistive touchscreen controller
MIT License
1 stars 10 forks source link

SPI mode sometimes wrong - CHIP ID check fails #3

Closed jerryneedell closed 6 years ago

jerryneedell commented 6 years ago

There is a known issue with the way the STMPE610 is initialized for SPI. Occasionally, it syncs to the wrong clock edge (SPI Mode 1 instead of SPI Mode 0). The Arduino version detects and corrects for this by switching the SPI Mode. https://github.com/adafruit/Adafruit_STMPE610/blob/master/Adafruit_STMPE610.cpp#L103

This driver has not yet implemented this and it results in a failure to detect the CHIP ID correctly. Usually retrying the initialization or power cycling the board gets it come up in the right state.