Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 6 of 6

Thread: CS42448 TDM problem

  1. #1
    Junior Member
    Join Date
    Mar 2020

    CS42448 TDM problem

    Hey everyone (Code in the bottom),


    I have bought a Teensy 3.6 and an audioboard ( and have been through the basic tutorials.
    To start with I just want it to throw out a sinus at some frequency on the DAC of the CS42448. To this I have used the audio system design tool ( and have made the following design (picuture):
    Click image for larger version. 

Name:	GUI1.png 
Views:	31 
Size:	9.2 KB 
ID:	19509

    The Problem

    Disclaimer: I am a noob in the sense that I am new to this and the problem might be straightforward, so please bear with me.

    When I run the program all i get on measurement (Using analog discovery) on Pin 23(yellow) and Pin 22(blue) is what is show in the picture below. But do not get a signal out on any of the jackports!
    Click image for larger version. 

Name:	TDM BUS1.png 
Views:	24 
Size:	80.1 KB 
ID:	19510

    I sincerely thank you all for your time and help beforehand!

    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    // GUItool: begin automatically generated code
    AudioSynthWaveformSine   sine1;          //xy=493,291
    AudioOutputTDM           tdm1;           //xy=663,388
    AudioConnection          patchCord1(sine1, 0, tdm1, 0);
    AudioControlCS42448      cs42448_1;      //xy=489,513
    // GUItool: end automatically generated code
    void setup() {
    // put your setup code here, to run once:
      AudioMemory(40);              //Sat til 40 fordi det rådede de til på PJRCs forum
    void loop() {
    // put your main code here, to run repeatedly:

  2. #2
    Your code looks fine to me. SDIN looks good but LRCK doesn't. Those spikes in the yellow trace appear to be ~22uS apart, which would be approx 44100Hz. Check your soldering.

  3. #3
    Junior Member
    Join Date
    Mar 2020
    Thanks for you input. I did find a short circuit between pin 63 (SCL) and pin 62 (DGND) which is shown in the picture below. I did not find any other short circuits on the Teensy breakout or on the Audioboard.

    Click image for larger version. 

Name:	PinShorting.jpg 
Views:	37 
Size:	90.8 KB 
ID:	19530

    However this doesn't seem to change anything. I also made sure that it starts the CS42448 in the code. To do this I turn on the onboard LED/Pin13 if .enable() doesnt work.
    When I did a recording in waveforms i got the picture below:

    Click image for larger version. 

Name:	TDM BUS2.png 
Views:	18 
Size:	62.0 KB 
ID:	19531

  4. #4
    Junior Member
    Join Date
    Mar 2020
    Hey there again! After fixing the short circuit it was an error 40 (because the error is placed 40 cm from the screen - me), in other words a software problem.

    So it is now fixed. Thank you for your help!

  5. #5
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    haha.. I knew the problem between the ears, but not the error 40
    I hope I remember this when I need it next time..

  6. #6
    Junior Member
    Join Date
    Jun 2019
    I often find the error lies between the chair and the keyboard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts