Audio WM8731 T3.6: I2S breaks I2C?

Status
Not open for further replies.

palmerr

Well-known member
Hi,

I'm setting up an open music labs audio board (WM8731) with a T3.6

Assuming the audio library uses I2S (WM8731 as slave) & I2C0 I have connected to the default pins for both.

I2S: SCK 9, RX 13, TX 22
I2C: SDA0 18, SCL0 19
Pullups: 1.2k to 3.3V rail

I2S buffer chip PSU pin (nominally +5V) connected to 3.3V rail, as T3.6 I/O is 3.3V

Teensyduino 1.31-beta.

In the code below, the loop() has a simple instruction to set the right line input to 0x05 - this is simply to give me something to watch on the CRO and logic analyser.

The issue:

The I2C runs fine up until I uncomment the "AudioOutputI2S i2ss1; " line, which I assume starts up the I2S interface.

good.gif

At this point, the WM8731 ceases to respond to Wire commands (SDA stays high for ACK).

bad.gif

BTW both these tests remain the same whether the I2S pins (9, 13, 22) are connected or disconnected from the WM8731.

Any clues?

Richard
--------------------------------------------------------

#include <Audio.h>
#include <Wire.h>
#include <SPI.h>

#define WM_ADDR 0x1a // WM8731
#define WM_RLI 0x07 // Right Line IN register

AudioControlWM8731 wm8731_1; //xy=576,536
AudioSynthWaveform waveform1; //xy=489,466
/*
AudioOutputI2S i2ss1; //xy=677,459
AudioConnection patchCord1(waveform1, 0, i2ss1, 0);
AudioConnection patchCord2(waveform1, 0, i2ss1, 1);
*/

int wireclock;
void setup() {
Serial.begin(38400);
while (!Serial)
;
Serial.println("Hello world");

wm8731_1.enable();
wm8731_1.volume(0.9);
wm8731_1.inputLevel(0.9);

AudioMemory(15);

waveform1.begin(WAVEFORM_SINE);
waveform1.frequency(440);
waveform1.amplitude(0.9);
}

void loop() {

Wire.beginTransmission(WM_ADDR);// Right Line IN
Wire.write(WM_RLI);
Wire.write(0x05); // simple pattern sets line in gain to something small
Wire.endTransmission();
delay(1);

}
 
Last edited:
To check my work, I ran the same code and connections up on a T3.2.

It worked fine (including with the I2S and patchcord code enabled) on the T3.2 but not on the T3.6

Subtle differences?
 
Egg on face.

I had jumpers that were still tied together in an IDC cable - parasitics were causing the issue.

Mischief managed.
 
Status
Not open for further replies.
Back
Top