Hi all.
In connection with a hobby project, I have to make use of both TDMs which are built into Teensy 4.1. Using designer tool I have connected 4 DC signals with an amplitude 1 on both TDM on the same channels. I get the expected output on TDM1 but TDM2 gives me something completely different. I have tried with different amplitudes values even with minus values too, it is as if TDM2 it has a different interpretation of data.
furthermore, TDM2 is offset by 2.5 us almost compared to TDM1. I have attached a picture with my scope measurements. I have used both analog and digital to eliminate that it is my measuring equipment that is wrong with, the outcome is the same.
What am i doing wrong? Does the TDM2 need to be initiated somehow to be working synchronised with TDM1?
On TDM1 I measure on pins 7 and 20
and on TDM2 I measure on pins 2 and 3.
In connection with a hobby project, I have to make use of both TDMs which are built into Teensy 4.1. Using designer tool I have connected 4 DC signals with an amplitude 1 on both TDM on the same channels. I get the expected output on TDM1 but TDM2 gives me something completely different. I have tried with different amplitudes values even with minus values too, it is as if TDM2 it has a different interpretation of data.
furthermore, TDM2 is offset by 2.5 us almost compared to TDM1. I have attached a picture with my scope measurements. I have used both analog and digital to eliminate that it is my measuring equipment that is wrong with, the outcome is the same.
What am i doing wrong? Does the TDM2 need to be initiated somehow to be working synchronised with TDM1?
On TDM1 I measure on pins 7 and 20
and on TDM2 I measure on pins 2 and 3.
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveformDc dc2; //xy=445.0000114440918,520.0000114440918
AudioSynthWaveformDc dc1; //xy=446.0000114440918,478.0000114440918
AudioSynthWaveformDc dc3; //xy=446.0000305175781,560.0000133514404
AudioSynthWaveformDc dc4; //xy=446.0000114440918,601.0000152587891
AudioOutputTDM tdm1; //xy=813.0001068115234,735.0000915527344
AudioOutputTDM2 tdm2_1; //xy=815.0000228881836,450
AudioConnection patchCord1(dc1, 0, tdm1, 0);
AudioConnection patchCord2(dc2, 0, tdm1, 4);
AudioConnection patchCord3(dc3, 0, tdm1, 11);
AudioConnection patchCord4(dc4, 0, tdm1, 14);
AudioConnection patchCord5(dc1, 0, tdm2_1, 0);
AudioConnection patchCord6(dc2, 0, tdm2_1, 4);
AudioConnection patchCord7(dc3, 0, tdm2_1, 11);
AudioConnection patchCord8(dc4, 0, tdm2_1, 14);
// GUItool: end automatically generated code
void setup() {
AudioMemory(100);
dc1.amplitude(1);
dc2.amplitude(1);
dc3.amplitude(1);
dc4.amplitude(1);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}