Hei guys.
Has any of you managed to use an airlift module with a teensy 3.6?
Cant get it to work for the life of me.
I haven't used it, but I noticed in looking at the product page, I see it says 'over 8Mhz SPI'. I would try and limit the SPI bus speed to 8Mhz to see if that helps. I've have some OLED displays that the Teensy 3.5 and 3.6 can send too much SPI data and overwhelm the devices with data much faster than the device can accept.
Similarly there are devices that take some time to power on. On an AVR system, the system is so slow that the device is normally ready when the code finishes initialization and runs the
setup code. But the Teensy 3.5/3.6/4.0 (and even 3.2) are so much faster than the AVR processor, that it might make sense to have a 3 second or so delay in
setup.
Another thing to try comes from
https://www.pjrc.com/better-spi-bus-design-in-3-steps/, and that is to put a pull-up resistor between your CS pin and 3.3v. In addition, make sure your connections are solid. With my problematical OLED displays, I had originally had to put the SPI bus speed down to 11Mhz in order to eliminate most of the on-screen corruption. But when I ditched the breadboard and went to a soldered protoboard, replaced the jumper wires with newer wires, and added a 2.2K pull-up resistor, suddenly I could now run two displays at 19Mhz.
Some Adafruit software doesn't have #ifdef's for Teensy, and if it doesn't have the Teensy #ifdefs, it may default to software emulation of SPI. Make sure you are using hardware SPI on the 3.6 (MOSI on pin 11, MISO on pin 12, SCLK on pin 13) and you are using the SPI Wire interface. For testing, make sure there aren't other SPI devices attached.
If the software has Teensy optimizations, you may need to have CS (and D/C for devices that have it, but airlift doesn't seem to have D/C) on one of the 'fast' CS pins (9, 10, 15, 20, and 21). Note, if you are using multiple SPI devices there are restrictions in using multiple pins:
- Pin 2 and pin 10 can't be used for SPI at the same time;
- Pin 6 and pin 9 can't be used for SPI at the same time;
- Pin 20 and pin 23 can't be used for SPI at the same time; (and)
- Pin 21 and pin 22 can't be used for SPI at the same time.