Teensy LC + Audio board DMAChannel error

Fantomas

New member
Hi guys and girls,
first time Teensy user before that AVR tinkerer.

I've installed Arduino 1.6.11 and TeensyduinoInstall.exe (Windows 7 x64). Switched Board to "Teensy LC" but after that things went downhill. I've loaded example:
Part_1_02_Hardware_Test unfortunatly Verify ends with an error:
Code:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_pt8211.cpp: In static member function 'static void AudioOutputPT8211::isr()':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_pt8211.cpp:84:25: error: 'class DMAChannel' has no member named 'TCD'

  saddr = (uint32_t)(dma.TCD->SADDR);

                         ^

Multiple libraries were found for "SD.h"
 Used: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD
 Not used: C:\Program Files (x86)\Arduino\libraries\SD
Using library Audio at version 1.3 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio 
Using library SPI at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI 
Using library SD at version 1.0.8 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD 
Using library SerialFlash at version 0.4 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SerialFlash 
Using library Wire at version 1.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Wire 
Using library Bounce in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Bounce (legacy)
Error compiling for board Teensy LC.

The same errors shows with PT8211Sine example.
I'm probably doing something stupid but was unable to google similar errors.
Hopefully someone can enlighten me.
 
Last edited:
Yes, the Audio-library does NOT work with the Teensy LC.

EDIT: The AudioShield does not have the PT8211 anyway....
 
Last edited:
I was hoping to use LC version for a mass production of my product.
I'm a little confused, shouldn't LC push audio via I2C to SGTL5000 on Audio Shield? I've even generated a sketch for that using Audio System Design Tool it might have other problems but I still get the same error as above:
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthWaveformSine   sine1;          //xy=212,175
AudioSynthWaveformSine   sine2;          //xy=219,234
AudioOutputI2S           i2s1;           //xy=534,183
AudioConnection          patchCord1(sine1, 0, i2s1, 0);
AudioConnection          patchCord2(sine2, 0, i2s1, 1);
AudioControlSGTL5000     sgtl5000_1;     //xy=386,285
// GUItool: end automatically generated code

int count=1;

void setup() {
  // put your setup code here, to run once:

  Serial.begin(115200);
  sgtl5000_1.enable();
  sgtl5000_1.volume(0.3);
 // sine1.begin(WAVEFORM_SINE);
 // sine2.begin(WAVEFORM_SINE);
  delay(1000);

}

void loop() {
  // put your main code here, to run repeatedly:
  Serial.print("Beep #");
  Serial.println(count);
  count = count + 1;
  sine1.frequency(440);
  sine1.amplitude(0.5);
 // wait(250);
 // sine1.amplitude(0);
 // wait(1750);
}

Error:
Code:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_pt8211.cpp:84:25: error: 'class DMAChannel' has no member named 'TCD'

  saddr = (uint32_t)(dma.TCD->SADDR);
 
Last edited:
Again: the LC is not supported by the Audio-Library...
Trying to fix some errors does not help.

Do you think the audio library could be updated to support the LC?

I mean the LC MCU is a Kinetis L26 which has both I2C and I2S (although only one data line so the quad output configuration definitely wouldn't work). But is there a specific reason why the LC doesn't work? Is it unable to provide the correct clocks to the SGTL5000 or something?
 
I mean the LC MCU is a Kinetis L26 which has both I2C and I2S (although only one data line so the quad output configuration definitely wouldn't work). But is there a specific reason why the LC doesn't work?
Teensy LC is ARM Cortex M0. Teensy 3.x is ARM Cortex M4.

M0 lacks a lot of math instructions that M4 has (used by the Audio lib), so it would be quite a bit slower. The Kinetis L peripherals are different from Kinetis K. Teensy LC is also rather short on RAM.

So supporting Teensy LC has arguably limited value and isn't a trivial fix.
 
Back
Top