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

Thread: Teensy 4 PDM Audio Input

  1. #1
    Junior Member
    Join Date
    Jun 2016
    Posts
    6

    Teensy 4 PDM Audio Input

    Hi all,

    I'm trying to interface a PDM microphone with T4, using the Audio System Design Tool.
    I linked the PDM input with the 'queue' class. The resulting code compiles for T3.6, but for T4 it produces an error.

    Here's the code:
    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputPDM            pdm1;           //xy=109,145
    AudioRecordQueue         queue1;         //xy=273,143
    AudioConnection          patchCord1(pdm1, queue1);
    // GUItool: end automatically generated code
    
    void setup() {
      
    }
    
    void loop() {
      
    }
    And here's the error:

    C:\...\Temp\arduino_build_881909\sketch\MicTest.in o.cpp.o: In function `AudioInputPDM::AudioInputPDM()':

    C:\...\arduino-1.8.10\hardware\teensy\avr\libraries\Audio/input_pdm.h:37: undefined reference to `AudioInputPDM::begin()'

    C:\...\AppData\Local\Temp\arduino_build_881909\ske tch\MicTest.ino.cpp.o: In function `AudioStream::AudioStream(unsigned char, audio_block_struct**)':

    C:\...\arduino-1.8.10\hardware\teensy\avr\cores\teensy4/AudioStream.h:130: undefined reference to `vtable for AudioInputPDM'

    collect2.exe: error: ld returned 1 exit status

    I'm using Arduino 1.8.10 and Teensyduino 1.48.
    Is PDM support not yet available on T4? Or do I have something misconfigured?

    Thanks!

  2. #2
    Junior Member
    Join Date
    Aug 2019
    Posts
    12

    Any luck?

    Quote Originally Posted by Sanworks View Post
    Hi all,

    I'm trying to interface a PDM microphone with T4, using the Audio System Design Tool.
    I linked the PDM input with the 'queue' class. The resulting code compiles for T3.6, but for T4 it produces an error.

    Here's the code:
    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioInputPDM            pdm1;           //xy=109,145
    AudioRecordQueue         queue1;         //xy=273,143
    AudioConnection          patchCord1(pdm1, queue1);
    // GUItool: end automatically generated code
    
    void setup() {
      
    }
    
    void loop() {
      
    }
    And here's the error:

    C:\...\Temp\arduino_build_881909\sketch\MicTest.in o.cpp.o: In function `AudioInputPDM::AudioInputPDM()':

    C:\...\arduino-1.8.10\hardware\teensy\avr\libraries\Audio/input_pdm.h:37: undefined reference to `AudioInputPDM::begin()'

    C:\...\AppData\Local\Temp\arduino_build_881909\ske tch\MicTest.ino.cpp.o: In function `AudioStream::AudioStream(unsigned char, audio_block_struct**)':

    C:\...\arduino-1.8.10\hardware\teensy\avr\cores\teensy4/AudioStream.h:130: undefined reference to `vtable for AudioInputPDM'

    collect2.exe: error: ld returned 1 exit status

    I'm using Arduino 1.8.10 and Teensyduino 1.48.
    Is PDM support not yet available on T4? Or do I have something misconfigured?

    Thanks!


    My apologies for reviving this topic. Did you have any luck with Teensy 4.0 and the PDM library support?


    I am currently working on a project that involves a PDM preamplifier and I am a bit lost due to the lack of info regarding the connections and library usage.

    Cheers

    dzalf

Posting Permissions

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