Forum Rule: Always post complete source code & details to reproduce any issue!
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 26 to 50 of 68

Thread: Teensyduino 1.52 Beta #3

  1. #26
    Hi,

    it seems to me that something in the i2s part of the audio library is broken, here is my code:

    Code:
    #include <Audio.h>
    
    AudioInputI2S             input;
    AudioAnalyzeNoteFrequency notefreq;
    AudioConnection           connection(input, 0, notefreq, 0);
    
    void setup() {
      AudioMemory(50);
      notefreq.begin(0.15);
    }
    
    void loop() {
      if (notefreq.available()) Serial.println(notefreq.read());
    }
    This doesn't work any more in beta, instead I have to use i2sQuad (which doesn't work in stable). The following doesn't work either in stable and beta regardless of i2s or i2sQuad:

    Code:
    #include <Audio.h>
    
    AudioInputI2S             input;
    // AudioInputI2SQuad             input;
    AudioAnalyzeFFT1024       fft;
    AudioConnection           connection(input, 0, fft, 0);
    
    void setup() {
      AudioMemory(50);
    }
    
    // copied from the fft example:
    void loop() {
      float n;
      int i;
    
      if (fft.available()) {
        // each time new FFT data is available
        // print it all to the Arduino Serial Monitor
        Serial.print("FFT: ");
        for (i = 0; i < 40; i++) {
          n = fft.read(i);
          if (n >= 0.01) {
            Serial.print(n);
            Serial.print(" ");
          } else {
            Serial.print("  -  "); // don't print "0.00"
          }
        }
        Serial.println();
      }
    }
    I use the Adafruit SPH0645 mems mic as input connected to a teensy 4 without the MCLK pin wired.

  2. #27
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    1,019
    Quote Originally Posted by XFer View Post
    Installed 1.52beta3 with Arduino IDE 1.8.12, on Windows 10 Pro 64 bit.

    I'm having a problem building a low power test based upon Duff's Snooze library: the library included with TD 1.52b3 can not find "SnoozeTimer.h"

    Target was Teensy 4.0.

    Full build log:

    Code:
    D:\Arduino\arduino-builder -dump-prefs -logger=machine -hardware D:\Arduino\hardware -hardware C:\Users\Fernando\AppData\Local\Arduino15\packages -hardware L:\Progetti\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -tools C:\Users\Fernando\AppData\Local\Arduino15\packages -built-in-libraries D:\Arduino\libraries -libraries L:\Progetti\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o3std,keys=en-us -ide-version=10812 -build-path c:\temp\arduino_build_306898 -warnings=none -build-cache c:\temp\arduino_cache_376848 -verbose L:\Progetti\Arduino\TeensyLowPowerTestOK\TeensyLowPowerTestOK.ino
    D:\Arduino\arduino-builder -compile -logger=machine -hardware D:\Arduino\hardware -hardware C:\Users\Fernando\AppData\Local\Arduino15\packages -hardware L:\Progetti\Arduino\hardware -tools D:\Arduino\tools-builder -tools D:\Arduino\hardware\tools\avr -tools C:\Users\Fernando\AppData\Local\Arduino15\packages -built-in-libraries D:\Arduino\libraries -libraries L:\Progetti\Arduino\libraries -fqbn=teensy:avr:teensy40:usb=serial,speed=600,opt=o3std,keys=en-us -ide-version=10812 -build-path c:\temp\arduino_build_306898 -warnings=none -build-cache c:\temp\arduino_cache_376848 -verbose L:\Progetti\Arduino\TeensyLowPowerTestOK\TeensyLowPowerTestOK.ino
    Using board 'teensy40' from platform in folder: D:\Arduino\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: D:\Arduino\hardware\teensy\avr
    Detecting libraries used...
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "c:\\temp\\arduino_build_306898\\sketch\\TeensyLowPowerTestOK.ino.cpp" -o nul
    Alternatives for Snooze.h: [Snooze_OLD@6.3.4 Snooze@6.3.4]
    ResolveLibrary(Snooze.h)
      -> candidates: [Snooze_OLD@6.3.4 Snooze@6.3.4]
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "c:\\temp\\arduino_build_306898\\sketch\\TeensyLowPowerTestOK.ino.cpp" -o nul
    Alternatives for TimeLib.h: [Time@1.6]
    ResolveLibrary(TimeLib.h)
      -> candidates: [Time@1.6]
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "c:\\temp\\arduino_build_306898\\sketch\\TeensyLowPowerTestOK.ino.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\Snooze.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\SnoozeBlock.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeAlarm.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeAudio.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeCompare.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeDigital.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeSPI.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeTimer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeTouch.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\SnoozeUSBSerial.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\Snoozelc5vBuffer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_32\\hal.c" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeAlarm.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeAudio.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeCompare.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeDigital.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeSPI.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeTimer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeTouch.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\SnoozeUSBSerial.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\Snoozelc5vBuffer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_35\\hal.c" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeAlarm.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeAudio.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeCompare.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeDigital.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeSPI.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeTimer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeTouch.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\SnoozeUSBSerial.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\Snoozelc5vBuffer.cpp" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_36\\hal.c" -o nul
    "D:\\Arduino\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=152 -DARDUINO=10812 -DARDUINO_TEENSY40 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\Arduino\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src" "-ID:\\Arduino\\hardware\\teensy\\avr\\libraries\\Time" "D:\\Arduino\\hardware\\teensy\\avr\\libraries\\Snooze\\src\\hal\\TEENSY_40\\hal.c" -o nul
    Alternatives for SnoozeTimer.h: []
    In file included from D:\Arduino\hardware\teensy\avr\libraries\Snooze\src\hal\TEENSY_40\hal.c:5:0:
    ResolveLibrary(SnoozeTimer.h)
    
      -> candidates: []
    D:\Arduino\hardware\teensy\avr\libraries\Snooze\src\hal\TEENSY_40\hal.h:41:25: fatal error: SnoozeTimer.h: No such file or directory
    
    Multiple libraries were found for "Snooze.h"
    compilation terminated.
    
     Used: D:\Arduino\hardware\teensy\avr\libraries\Snooze
     Not used: L:\Progetti\Arduino\libraries\Snooze_OLD
    Using library Snooze at version 6.3.4 in folder: D:\Arduino\hardware\teensy\avr\libraries\Snooze 
    Using library Time at version 1.6 in folder: D:\Arduino\hardware\teensy\avr\libraries\Time 
    
    Error compiling for board Teensy 4.0.

    The relevant part (includes and defines):

    Code:
    #include <Snooze.h>
    #include <TimeLib.h>
    
    volatile unsigned long int    g_elapsedMilliseconds;
    volatile elapsedMillis g_millis;
    volatile unsigned long int g_pulseCount1 = 0;
    volatile unsigned long int g_pulseCount2 = 0;
    
    // Snooze:
    // Load drivers
    // SnoozeTouch g_snoozeModule_touch;
    SnoozeDigital g_snoozeModule_digitalPinInterrupt;
    SnoozeTimer g_snoozeModule_timer;
    // Install drivers to a Snooze Config Block
    SnoozeBlock g_snoozeConfig(g_snoozeModule_timer, g_snoozeModule_digitalPinInterrupt);
    Please let me know if I can be of further help.
    Did you try to download the latest Snooze beta for T4 support? Just clone it or download the zip file I haven't updated the releases since I want to get any bugs squashed first.

  3. #28
    Hi Duff, in addition to what I stated in my above post I also can't get your code from this post to work with i2s/i2sQuad as input.

  4. #29
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    339
    Quote Originally Posted by duff View Post
    Did you try to download the latest Snooze beta for T4 support? Just clone it or download the zip file I haven't updated the releases since I want to get any bugs squashed first.
    Builds OK with 6.3.8beta!
    Did not have a chance to really try it, but good news nonetheless.

  5. #30
    OK, I read all forum posts about the SPH0645 I could find and spend quite some hours on fiddling with it. The problem seems to be that SPH0645 violates i2s specs. At least in my case it spits out only crazy noisy recordings, and I tried 2 boards. As AnalogAudioInput still does not work on T4 I ordered some other i2s mems mic bords to try. Request: please, I think it would be helpful to mention in the list of compatible mics that the SPH0645 causes troubles! Also it seems some people are desperately waiting for AnalogAudioInput to work on T4... Thanks again for all the great work!

  6. #31
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,920
    There are good AD-breakouts like PCM1808 for ~4..5 EUR which are way better than AnalogAudioInput (and they only need 2 data-pins more)

    https://www.google.com/search?q=PCM1...w=1611&bih=864

  7. #32
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    @jpk
    From the datasheet:
    The SELECT pin determines when the microphone drives the Data pin. When SELECT = HIGH the Data pin is driven when the WS = HIGH, otherwise it is tri-stated (high impedance).
    When operating a single microphone on an I2S bus, a pull down resistor (100K Ohms) should be placed from the Data pin to ground to insure the bus capacitance is discharged.

  8. #33
    Quote Originally Posted by flashburn View Post
    @jpk From the datasheet
    Thanks for the hint! The pulldown can't be enabled by pinMode...?

    Quote Originally Posted by Frank B View Post
    There are good AD-breakouts like PCM1808
    Thanks! But I don't have space for an additional board...

  9. #34
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,380
    Quote Originally Posted by defragster View Post
    Posted on TD 1.52 b2 thread was a note about Time Sync with T_4.x from secure RTC : pjrc.com/threads/60354-Teensyduino-1-52-Beta-2

    Source working fix to apply?::
    pjrc.com/threads/45377-TimeTeensy3-example-gt-Time-chosen-is-not-permanent

    <edit> Also noted there (or related post) that Teensy.exe loader time set on T_4.x is "Off by one hour" for Windows users.
    This post suggests Teensy Loader time is also one hour Off on MAC as well : How-to-access-the-internal-RTC-in-a-Teensy-4-0

    The T_4.x SRTC doesn't store time changes as noted above without code fix linked. Not sure if that same cose works on all T_3.x's?

    Also in post just linked a Platform IO user wonders how to get Teensy Loader without IDE and TD install? There is a link to Teensy.exe 1.48 here pjrc.com/teensy/teensy.exe on page : pjrc.com/teensy/loader_xp.html

  10. #35
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,380
    Paul: would it make sense to put a copy of Teensy.exe in some fashion ( all OS zipped? ) on the storage area for each build … pjrc.com/teensy/td_151/

  11. #36
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,691
    Changes to how I build or package the software don't make sense while trying to release new hardware!

  12. #37
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    Quote Originally Posted by jpk View Post
    Thanks for the hint! The pulldown can't be enabled by pinMode...?
    The 100kΩ is a very weak pulldown, just to discharge static on the data line when output is disconnected. The pinmode pulldown is a strong, which has disadvantages on signal quality and loads the mic diver so much it leads to degradation in signal.

  13. #38
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    just in case, may I remind of the GUI bug still existent since years?
    https://forum.pjrc.com/threads/45216...I-related-bugs
    It also cuts usability of the tool, as it is often impossile to re-import the work to make changes, continue work, etc. Actually it is a lottery, because sometimes it just works, but sometimes not. The reason is unclear, so user has always to expect the tool wil not allow re-import and everything has to be done again.

  14. #39
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,920
    Quote Originally Posted by flashburn View Post
    The pinmode pulldown is a strong, which has disadvantages on signal quality and loads the mic diver so much it leads to degradation in signal.
    Where did you read this?
    According to the manual, the only Information I found says the PIN-Pulldowns are 100k, too.
    So, I'd appreciate a source.

  15. #40
    Senior Member
    Join Date
    Jan 2020
    Location
    Toscana
    Posts
    130
    yes, the manual. But why does it not work that way?
    Before firing up a dispute, how about the GUI bug?

  16. #41
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,920
    So no source and it was just a guess?
    Please stop that in the future or say that you don't know it exactly.

    Other users may read it and may think the T4-Pulldowns are stronger (which is still possible - but again, I read 100k on Page 956, Reference Manual - maybe that's not correct?).
    Last edited by Frank B; 05-02-2020 at 04:09 PM.

  17. #42
    Senior Member duff's Avatar
    Join Date
    Jan 2013
    Location
    Las Vegas
    Posts
    1,019
    Quote Originally Posted by jpk View Post
    Hi Duff, in addition to what I stated in my above post I also can't get your code from this post to work with i2s/i2sQuad as input.
    No I haven't looked into that at all.

    Quote Originally Posted by XFer View Post
    Builds OK with 6.3.8beta!
    Did not have a chance to really try it, but good news nonetheless.
    I tried to make sure all the examples worked One caveat is that hibernate wakes through a reset currently.

  18. #43
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    339
    Quote Originally Posted by duff View Post
    One caveat is that hibernate wakes through a reset currently.
    Ah, could you please elaborate on that?
    Does Teensy 4.0 resets itself when waking from Snooze.hibernate?

  19. #44
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,691
    Quote Originally Posted by Frank B View Post
    I read 100k on Page 956, Reference Manual - maybe that's not correct?
    Looks like the reference manual is correct, the pulldown resistor is 100K.

    To check this I connected 220K resistor between pin 20 and 3.3V and ran this program.

    Code:
    void setup() {
      pinMode(20, INPUT_PULLDOWN);
    }
    
    void loop() {
    }
    My multimeter reads 1.06 volts.

    Click image for larger version. 

Name:	DSC_0781_web.jpg 
Views:	13 
Size:	171.5 KB 
ID:	19955

  20. #45
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,691
    Quote Originally Posted by mjs513 View Post
    Yep. You have to set up xbar to use the different timers. Attached is a zip for what we were playing for chaining pin pairs for analog reads. Pretty much shows how to set up the timers. Does get a bit confusing with all the timers we set up to use. Basically with xbara you connect the timer to the ADC trigger.
    I'm working with this today. Have it running here with interrupts. No DMA yet...

  21. #46
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,589
    Quote Originally Posted by PaulStoffregen View Post
    I'm working with this today. Have it running here with interrupts. No DMA yet...
    Sounds like you are having fun with it. @KurtE and I got carried away with it when we were testing. @KurtE had DMA working with it. Not sure this is the latest but I attaching the last zip I have. Maybe @KurtE has a later one.
    Attached Files Attached Files

  22. #47
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,691
    I got DMA working, though only a very simple test so far.

    Code:
    #include "DMAChannel.h"
    
    extern "C" void xbar_connect(unsigned int input, unsigned int output);
    
    const uint8_t adc2_pin_to_channel[] = {
            7,      // 0/A0  AD_B1_02
            8,      // 1/A1  AD_B1_03
            12,     // 2/A2  AD_B1_07
            11,     // 3/A3  AD_B1_06
            6,      // 4/A4  AD_B1_01
            5,      // 5/A5  AD_B1_00
            15,     // 6/A6  AD_B1_10
            0,      // 7/A7  AD_B1_11
            13,     // 8/A8  AD_B1_08
            14,     // 9/A9  AD_B1_09
            255,    // 10/A10 AD_B0_12 - only on ADC1, 1 - can't use for audio
            255,    // 11/A11 AD_B0_13 - only on ADC1, 2 - can't use for audio
            3,      // 12/A12 AD_B1_14
            4,      // 13/A13 AD_B1_15
            7,      // 14/A0  AD_B1_02
            8,      // 15/A1  AD_B1_03
            12,     // 16/A2  AD_B1_07
            11,     // 17/A3  AD_B1_06
            6,      // 18/A4  AD_B1_01
            5,      // 19/A5  AD_B1_00
            15,     // 20/A6  AD_B1_10
            0,      // 21/A7  AD_B1_11
            13,     // 22/A8  AD_B1_08
            14,     // 23/A9  AD_B1_09
            255,    // 24/A10 AD_B0_12 - only on ADC1, 1 - can't use for audio
            255,    // 25/A11 AD_B0_13 - only on ADC1, 2 - can't use for audio
            3,      // 26/A12 AD_B1_14 - only on ADC2, do not use analogRead()
            4,      // 27/A13 AD_B1_15 - only on ADC2, do not use analogRead()
    #ifdef ARDUINO_TEENSY41
            255,    // 28
            255,    // 29
            255,    // 30
            255,    // 31
            255,    // 32
            255,    // 33
            255,    // 34
            255,    // 35
            255,    // 36
            255,    // 37
            1,      // 38/A14 AD_B1_12 - only on ADC2, do not use analogRead()
            2,      // 39/A15 AD_B1_13 - only on ADC2, do not use analogRead()
            9,      // 40/A16 AD_B1_04
            10,     // 41/A17 AD_B1_05
    #endif
    };
    
    
    DMAChannel dma;
    uint16_t output;
    
    
    void setup()
    {
            while (!Serial);
            Serial.println("ADC triggering test");
    
            // configure a timer to trigger ADC
            const int comp1load = 58594; // approx 10 Hz with TMR_CTRL_PCS=15
            TMR3_ENBL &= ~(1<<3);
            TMR3_SCTRL3 = TMR_SCTRL_OEN | TMR_SCTRL_FORCE;
            TMR3_CSCTRL3 = TMR_CSCTRL_CL1(1) | TMR_CSCTRL_TCF1EN;
            TMR3_CNTR3 = 0;
            TMR3_LOAD3 = 0;
            TMR3_COMP13 = comp1load;
            TMR3_CMPLD13 = comp1load;
            //TMR3_CTRL3 = TMR_CTRL_CM(1) | TMR_CTRL_PCS(9) | TMR_CTRL_LENGTH | TMR_CTRL_OUTMODE(3);
            TMR3_CTRL3 = TMR_CTRL_CM(1) | TMR_CTRL_PCS(15) | TMR_CTRL_LENGTH | TMR_CTRL_OUTMODE(3);
            TMR3_DMA3 = TMR_DMA_CMPLD1DE;
            //CORE_PIN15_CONFIG = 1 ; // GPIO_AD_B1_03, ALT1 = QTIMER3_TIMER3, page 495
            TMR3_CNTR3 = 0;
            TMR3_ENBL |= (1<<3);
    
            // connect the timer output the ADC_ETC input
            const int trigger = 4; // 0-3 for ADC1, 4-7 for ADC2
            CCM_CCGR2 |= CCM_CCGR2_XBAR1(CCM_CCGR_ON);
            xbar_connect(XBARA1_IN_QTIMER3_TIMER3, XBARA1_OUT_ADC_ETC_TRIG00 + trigger);
    
            // turn on ADC_ETC and configure to receive trigger
            if (ADC_ETC_CTRL & (ADC_ETC_CTRL_SOFTRST | ADC_ETC_CTRL_TSC_BYPASS)) {
                    //Serial.printf("ADC_ETC_CTRL = %08X\n", ADC_ETC_CTRL);
                    ADC_ETC_CTRL = 0; // clears SOFTRST only
                    ADC_ETC_CTRL = 0; // clears TSC_BYPASS
                    //Serial.printf("ADC_ETC_CTRL = %08X\n", ADC_ETC_CTRL);
            }
            ADC_ETC_CTRL |= ADC_ETC_CTRL_TRIG_ENABLE(1 << trigger) | ADC_ETC_CTRL_DMA_MODE_SEL;
            ADC_ETC_DMA_CTRL |= ADC_ETC_DMA_CTRL_TRIQ_ENABLE(trigger);
    
            // configure ADC_ETC trigger4 to make one ADC2 measurement on pin A2
            const int len = 1;
            const int pin = A2;
            IMXRT_ADC_ETC.TRIG[trigger].CTRL = ADC_ETC_TRIG_CTRL_TRIG_CHAIN(len - 1) |
                    ADC_ETC_TRIG_CTRL_TRIG_PRIORITY(7);
            IMXRT_ADC_ETC.TRIG[trigger].CHAIN_1_0 = ADC_ETC_TRIG_CHAIN_HWTS0(1) |
                    ADC_ETC_TRIG_CHAIN_CSEL0(adc2_pin_to_channel[pin]) | ADC_ETC_TRIG_CHAIN_B2B0;
    
            // set up ADC2 for 12 bit mode, hardware trigger
            Serial.printf("ADC2_CFG = %08X\n", ADC2_CFG);
            ADC2_CFG |= ADC_CFG_ADTRG;
            ADC2_CFG = ADC_CFG_MODE(2) | ADC_CFG_ADSTS(3) | ADC_CFG_ADLSMP | ADC_CFG_ADTRG |
                    ADC_CFG_ADICLK(1) | ADC_CFG_ADIV(0) /*| ADC_CFG_ADHSC*/;
            ADC2_GC &= ~ADC_GC_AVGE; // single sample, no averaging
            ADC2_HC0 = ADC_HC_ADCH(16); // 16 = controlled by ADC_ETC
    
            // use a DMA channel to capture ADC_ETC output
            dma.begin();
            dma.TCD->SADDR = &(IMXRT_ADC_ETC.TRIG[4].RESULT_1_0);
            dma.TCD->SOFF = 0;
            dma.TCD->ATTR = DMA_TCD_ATTR_SSIZE(1) | DMA_TCD_ATTR_DSIZE(1);
            dma.TCD->NBYTES_MLNO = 2;
            dma.TCD->SLAST = 0;
            dma.TCD->DADDR = &output;
            dma.TCD->DOFF = 0;
            dma.TCD->CITER_ELINKNO = 1;
            dma.TCD->DLASTSGA = 0;
            dma.TCD->BITER_ELINKNO = 1;
            dma.TCD->CSR = DMA_TCD_CSR_INTMAJOR;
            dma.triggerAtHardwareEvent(DMAMUX_SOURCE_ADC_ETC);
            dma.enable();
            dma.attachInterrupt(isr);
    
    }
    
    void isr()
    {
            dma.clearInterrupt();
            Serial.printf("isr %u\n", output);
    }
    
    void loop()
    {
            // make measurements with ADC1 while ADC_ETC uses ADC2
            Serial.printf("\tA0 = %d\n", analogRead(A0));
            delay(1000);
    }

  23. #48
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,920
    RE: DMA:
    Can you align the DMAMEM (in the linkerscripts) to 32Bytes instead 16, please?

    4.3.1.Use cacheable buffersNormally buffers on the OCRAM, SDRAMare Cacheable and Write-Back. It can be in the stack, static section or allocated from heap. To use such buffer as DMAsource, user must performa DCACHE clean operation is done before DMA started, this makessure all of the data are committed to the memoryfrom cache. If buffer is used as DMAreceive destination, a DCACHE invalidate operation must be done after DMA completedand before CPU or other mastersread.The buffer address should be L1 cache line size aligned(32bytesin i.MXRT).
    From here : https://www.nxp.com/docs/en/applicat...te/AN12042.pdf

  24. #49
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    22,691
    Quote Originally Posted by Frank B View Post
    Can you align the DMAMEM (in the linkerscripts) to 32Bytes instead 16, please?
    Like this?
    https://github.com/PaulStoffregen/co...49c2b416e75b2a

    Edit: however, this doesn't eliminate the need to align buffers to 32 bytes. It only adds padding so whatever the link places in memory after those buffer (which today is only the heap aligned in 4K blocks anyway) gets aligned to 32 bytes.

  25. #50
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    5,589
    Quote Originally Posted by PaulStoffregen View Post
    I got DMA working, though only a very simple test so far.
    Just got up - cool you got it working going through the sketch started remembering what we did @KurtE did all the DMA stuff I played more with the chaining of the pins and XBAR setup, I think, seems like forever since we did that.

    EDIT: Just to add for buffers. Kurt had this in is sketch that I believe is what you all are talking about for DMAMEM
    Code:
    const uint32_t buffer_size = 1600;
    DMAMEM static volatile uint16_t __attribute__((aligned(32))) dma_adc_buff1[buffer_size];
    DMAMEM static volatile uint16_t __attribute__((aligned(32))) dma_adc_buff2[buffer_size];
    AnalogBufferDMA abdma1(dma_adc_buff1, buffer_size, dma_adc_buff2, buffer_size);

Posting Permissions

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