adafruit / Adafruit_STMPE610

Arduino library for STMPE610/811 resistive touch screen controllers
MIT License
38 stars 32 forks source link

Does not work with Teensy 3.6 #12

Closed Rababermaber closed 5 years ago

Rababermaber commented 5 years ago

I tried the Library on a Teensy 3.6 and it doesn't work. So I tested some stuff out and got it to work unreliably with the clock frequency lowered to 120Mhz or 96Mhz. I also hooked the DOUT up to my oscilloscope and found out that the CLK frequency was always at 1Mhz at all clock frequencies including 180Mhz and 240Mhz.

ladyada commented 5 years ago

yeah thats normal, the SPI transaction is set to 1MHz https://github.com/adafruit/Adafruit_STMPE610/blob/master/Adafruit_STMPE610.cpp#L108 no idea why it doesnt work besides that but the SPI freq is correct

Rababermaber commented 5 years ago

I located the problem: Everything works when I initialize the IC with the Teensy 3.6 set to 96Mhz, and then comment out the initialisation commands and setting the Teensy back to 180Mhz. So there is somehow a problem with initialising the STMPE610 when the Teensy is set to 180Mhz(above 96/120Mhz).

ladyada commented 5 years ago

we've done quite a refactor, this is likely fixed? please try it and reopen if still an issue

BlueGene00 commented 5 years ago

Hello, I have also tried the 3.5" Feather TFT (Library version 1.1.0) with a Teensy 3.6 and the touch function does not work... With an Feather M0 it works without issues.

I have found this topic here and added the delays: https://forum.pjrc.com/threads/54982-TEENSY-3-6-ADAFRUIT-3-5-quot-TFT-touch-controller-issue

Now it works some kind of, but there are some issues and it is not 100% reliable.

Please check the libary with a Teensy 3.6.

ladyada commented 5 years ago

tanks, please submit a PR with the delays you have added!