Teensy 3.6 + Audio adapter + sumotoy's SSD1331 library

Status
Not open for further replies.

Paul K.

New member
Hi all,

I'm currently working on an audio device/preamp thing, that involves a Teensy 3.6, the audio adapter board, and an user interface made of an SPI OLED screen and some encoders.

Until now, I've been using a cheap SPI display and software SPI and everything have been working fine, but I decided to switch to a SSD1331 SPI RGB OLED and sumotoy's fast library, as I want to display animations and/or realtime visualization of the audio output. The library is https://github.com/sumotoy/SSD_13XX.

Of course, I am aware that the audio board uses the default SPI pins for I2S, so when initializing my SPI display, I give it the following setup:

Code:
/*
 * SPI DISPLAY DEFINES
 */
#define __CS  	21
#define __DC  	20
#define __SCLK	14
#define __MOSI	7
#define __RST 	22

SSD_13XX display = SSD_13XX(__CS, __DC, __RST, __MOSI, __SCLK);

I believe those are the correct pins as they are used to communicate with the SD card on the audio board.

Now here's the issue: when I use the audio board without initializing the screen everything works fine (except the screen, of course). The screen also functions properly, when initialized. But as soon as the begin function for the screen is called, the audio board goes silent. The order of the initialization (screen before sound, or the other way around) doesn't change anything.

I've also noticed that using multithreading (https://github.com/ftrias/TeensyThreads) breaks the same way when I start a new thread.

I am aware that both libraries (Audio and fast SSD1_3XX) are very close to hardware, so here's my question: is there an obvious hardware conflict I didn't take care of? i.e DMA channels, SPI "behind the scene" config, perhaps timers?

Has anybody already used those two peripherals at the same time, and if yes, how?

Maybe switching the display to the second SPI transceiver could solve the problem, but I don't know if sumotoy's lib supports that.

Additionally I could switch to software SPI, but that would prevent me from displaying real-time animations, as well as reducing the CPU power for the audio processing (even though the 3.6 could probably handle it easily.)

I can post my complete code if necessary, but it really isn't more than initializing the two libraries one after the other!

Thanks in advance for your support!

Regards,

Paul
 
Status
Not open for further replies.
Back
Top