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 55

Thread: Teensyduino 1.52 Released

  1. #26
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,777
    Quote Originally Posted by analog&RFmodels View Post
    Frank B - I am chomping at the bit to play with Duff's snooze lib included in 1.52 for Teensy 4. Do you think that the
    serial monitor is so broken that someone with only medium Teensy experience (2.5 year) and medium programming
    skills (amateur for 44 year) could get anything done with 1.52 or should I wait ? running 1.48 now. thanks
    Serial Monitor generally not any problem - at least on Windows. It only gets freaked out with output too fast too read.

    General debug output - even heavy output works perfectly fine. Just the T_4.x running without restraint can wig out the computer.

    If anything it is as good or better than what was shipped in TD_1.48

  2. #27
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    Just the T_4.x running without restraint can wig out the computer.
    Hardware/software: Acer desktop, Win7, IDE 1.8.12, TD 1.52.

    You're right. With my T4x boards, I get all kinds of problems. Port not found, port busy, no upload, upload but no printout, partial printout, always have to push the reset button on the board to get it to run and print. With my T3 boards, upload always works followed by run and full debug printout.

    Tried lowering the CPU clock to 150MHz and 396MHz and it always works correctly. At 450MHz, it starts to fail with partial prints and gets worse when faster. Surprisingly, after using it at the lower speeds, it does not fail as often at 600MHz but that can change later this morning. Running at lower speeds may not be an option for me. My sonar project transmits a chirp output to a DAC then collects dual channel echo data. It uses the nanos() function for timing. If I have to live with the lower speed, 396MHz, then I'll have to run all the timing test again. Initial test shows that 600MHz is close to cutoff.

  3. #28
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    Tried to use a slow USB Hub(12MB/s) ?
    Upgrading from Win7 might be an option, too.

  4. #29
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    The Win7 box is about 15 yrs old and already sluggish. Going to Win10 is not an option at this point. It will eventually run as dual boot with Mint Mate or LMDE. I see the same problem on a new Win10 laptop but will duplicate the CPU speed test on it later today. We had a power outage earlier this morning so getting stuff back on line.

    I have a V3.1 hub that was needed to get an SDR-Kits VNMA running correctly, same kind of USB problem. I'll try that on Win7 and see what happens.

    Thanks for the hub suggestion. I had not thought of that.

  5. #30
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,665
    Try the suggestion posted on MTP-responder thread to improve USB communication, by changing the status function in usb.c

  6. #31
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    I find numerous usb.c files but none contain the mentioned function, usb_transfer_status. Do you have a location for this file? What will happen if running a lower speed device with the file change still in effect?

  7. #32
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    Tried a USB3.1 hub and a USB2 active extender. Neither solved the problem and now the board will not work correctly at 396MHz.

  8. #33
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,777
    Quote Originally Posted by Arctic_Eddie View Post
    I find numerous usb.c files but none contain the mentioned function, usb_transfer_status. Do you have a location for this file? What will happen if running a lower speed device with the file change still in effect?
    Perhaps this noted here: MTP-Responder-for-SPIFFS

    Found here with TD 1.52 there is a copy as : ...\hardware\teensy\avr\cores\teensy4\usb.c

    Code:
    In addition to use MTPspiffs above 450MHz it requires a change to the core file usb.c per @WMXZ:
    
    
    modify usb.c: function: usb_transfer_status changed #if 0 to #if 1

  9. #34
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    Found and fixed. It helps as I now get a run and print after upload. The first time the print is chopped off before the end but the reset button on the board gives a complete print. This problem is so irregular that I can't tell if it's really fixed, but definitely better.

    Thanks all for the help.

  10. #35
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    112

    Teensyduino 1.52 problem w ADC backward compat ?

    the code below is a small excerpt from a program that compiled fine under 1.48 but not under 1.52
    i am hoping i am doing something wrong and that it is not a problem with backward compat because
    there is a lot of sweat in some T36 programs i have done

    done with Ard 1.8.5, TD 1.48 and 1.52
    i noticed that after installing 1.52 on top of 1.48 i had to delete a folder in snooze lib
    to eliminate a compile error on a T4 program that used snooze which made me believe
    that there should be a TD uninstall

    notes in top of code describe lines that are choked on.

    any help appreciated

    Code:
    // 1.52 chokes on the pinMode lines and if you
    // comment them out
    // then it chokes on all of the adc->set...
    // lines
    // this was fine under 1.48
    
    #include <ADC.h>
    
      unsigned short int i,j,n;
    
    ADC *adc = new ADC(); // adc object;
    
    int main() {
    
    
        pinMode(readPin,  INPUT);
        pinMode(readPin2, INPUT);
    
        pinMode(A10, INPUT); //Diff Channel 0 Positive
        pinMode(A11, INPUT); //Diff Channel 0 Negative
    
    loop:
    
        adc->setAveraging(1);
        adc->setResolution(12);
        adc->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
        adc->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
        adc->setAveraging(1, ADC_1);
        adc->setResolution(12, ADC_1);
        adc->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED, ADC_1);
        adc->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED, ADC_1);
    
     goto loop;
    
    }

  11. #36
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,777
    Quote Originally Posted by analog&RFmodels View Post
    the code below is a small excerpt from a program that compiled fine under 1.48 but not under 1.52
    i am hoping i am doing something wrong and that it is not a problem with backward compat because
    there is a lot of sweat in some T36 programs i have done

    done with Ard 1.8.5, TD 1.48 and 1.52
    i noticed that after installing 1.52 on top of 1.48 i had to delete a folder in snooze lib
    to eliminate a compile error on a T4 program that used snooze which made me believe
    that there should be a TD uninstall

    notes in top of code describe lines that are choked on.

    any help appreciated

    // 1.52 chokes on the pinMode lines and if you
    // comment them out
    // then it chokes on all of the adc->set...
    // lines
    // this was fine under 1.48
    Is this trouble recompiling for same T_3.6?

    ADC is included from outside github - there were changes made to support T_4.x ... Check that for - issues - this link ? github.com/pedvide/ADC

    Have seen postings that somethings got altered but not followed ... may be a thread here with that discussion as well

  12. #37
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    63
    I tried compiling your program for both a T3.6 and a T4.0.

    After declaring some values for readPin and readPin2, it sailed through both pinMode lines, and then errored out on setAveraging, setResolution, setConversionSpeed, et al., not being declared.

    A quick look inside the ADC library verified that those functions did indeed not exist.

    Looking through the history for ADC.h, the author of that library has done some reorganization in the past few months, and that library no longer looks like it did when you originally wrote your code.

    The following modified snippet compiled w/o error for both T3.6 and T4.0 under Teensyduino 1.52. Whether or not it does what you want it to do is another question!

    Code:
    // 1.52 chokes on the pinMode lines and if you
    // comment them out
    // then it chokes on all of the adc->set...
    // lines
    // this was fine under 1.48
    
    #include <ADC.h>
    
      unsigned short int i,j,n;
    
    ADC *adc = new ADC(); // adc object;
    
    int readPin = A10;
    int readPin2 = A11;
    
    int main() {
    
    
        pinMode(readPin,  INPUT);
        pinMode(readPin2, INPUT);
    
        pinMode(A10, INPUT); //Diff Channel 0 Positive
        pinMode(A11, INPUT); //Diff Channel 0 Negative
    
    loop:
    
        adc->adc0->setAveraging(1);
        adc->adc0->setResolution(12);
        adc->adc0->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
        adc->adc0->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
        adc->adc1->setAveraging(1);
        adc->adc1->setResolution(12);
        adc->adc1->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
        adc->adc1->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
    
     goto loop;
    
    }

  13. #38
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    This problem is so irregular that I can't tell if it's really fixed, but definitely better.
    After a day of working with the "fix", I'm going back to the original version of usb.c. During the morning, the fix would give me some serial printout after an upload but generally not all of it. The reset button would work after that. As the day went by, it slowly reverted back to the original problem. I tried TyTools 0.9.0 and the upload fails but no reason given. Uninstalled TyTools and put usb.c back in it's original form. Ran some timing tests and I need at least 450MHz to make the sonar program work correctly. However, debug only works at 396MHz and below. Will just live with it until someone discovers the source of the problem and it's cure. It's very irregular and no fixed pattern.

  14. #39
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    112
    Silverlock,
    that did it - i had looked thru the documentation and lib files but overlooked that - amateur programmer who does
    not know CPP - only C - so i think whenever i see -> or : or :: my brain goes into a very confused state.
    thank you for taking the time to look at that.

    defragster,
    yes, that prob was with T36 and TD1.52 - Silverlock found my problem - backward compat is not 100% but is close
    enuf that repair time will not be bad. i will yet test some TLC and T4 ADC code similarly with this fix.

  15. #40
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    112

    TD 1.52 prob with TLC doing AtoD - worked 1.41 and 1.48

    the fixes for T36 to do ADC setup also worked for T4. almost work for TLC.

    in the code below the disableDMA call was my feeble attemp at a fix - did not work. code below is an excerpt
    from larger code that does fft w windowing ,sinc filtering,decimation,then fft. error message has to do with
    DMA - looking in the header and cpp files in the lib and the html doc files there i cannot figure out who is
    calling for enableDMA - it is not me - at least not directly. but the compiler chokes when somebody calls
    enableDMA.

    any help appreciated.

    below is the code and the compile log w error shown.

    this is the code

    Code:
    // TLC
    #include <ADC.h>
    
      const int readPin = A10; // ADC0
      const int readPin2 = A11; // ADC1
      float acc,acc2;
      volatile int count,c2,md,dmy;
    
      IntervalTimer it1;
    
      short unsigned int value;
    
      int led = 13;
    
    #define pi     3.14159265
    
      union  u {
      short unsigned int adin[1100];
             float d2[256];
      };
    
      union u ary;
      
      float d1[256];
    
      float q,x,xa,y,nng,xp;
    
      float t1,t2,s,c,a,m,fi,nnf,nnfr,jlf,jrf;
      unsigned short int n1,n2,n3,n4,n5,n6,n7,n8,n9,nn,il,jl;
      signed short int yi;
    
      unsigned short int i,j,n;
    
      volatile unsigned short int flag,flagg;
    
    
    ADC *adc = new ADC(); // adc object;
    
    void getad() {
        cli();
        value = adc->analogRead(readPin);
        ary.adin[count] = value;
        count = count + 1;
        if(count > 1100) flagg = 1;
        sei();
        return;
    }
    
    int main() {
    
        adc->adc0->disableDMA();
        count = 0;
        md = 0;
        pinMode(LED_BUILTIN, OUTPUT);
        pinMode(readPin, INPUT);
        pinMode(readPin2, INPUT);
    
        pinMode(A10, INPUT); //Diff Channel 0 Positive
        pinMode(A11, INPUT); //Diff Channel 0 Negative
    
        adc->adc0->setAveraging(1);
        adc->adc0->setResolution(12);
        adc->adc0->setConversionSpeed(ADC_CONVERSION_SPEED::VERY_HIGH_SPEED);
        adc->adc0->setSamplingSpeed(ADC_SAMPLING_SPEED::VERY_HIGH_SPEED);
    
    
       delay(1000);
    
    mloop:
      
       count = 0;
       md = 0;
    
       flagg = 0;
    
      it1.begin (getad,25);
     cloop:
        if (flagg == 0) goto cloop;;
      it1.end();
    
      nn=256;
      nnf=256.0;
      nng=1024.0;
      n5=1100;
      fi=1.0;
    
    
        if (flag == 0) {flag=1; digitalWrite(led, HIGH); goto mloop;}
        if (flag == 1) {flag=0; digitalWrite(led,  LOW); goto mloop;}
    
    
    }
    and this is the compile log

    Code:
    Arduino: 1.8.5 (Windows 7), TD: 1.52, Board: "Teensy LC, Serial, 48 MHz, Smallest Code, US English"
    
    C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dell\Documents\Arduino\libraries -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,opt=osstd,keys=en-us -ide-version=10805 -build-path C:\Users\Dell\AppData\Local\Temp\arduino_build_493692 -warnings=none -build-cache C:\Users\Dell\AppData\Local\Temp\arduino_cache_283853 -verbose C:\Users\Dell\Documents\Arduino\libraries\arf1\arf1.ino
    C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dell\Documents\Arduino\libraries -fqbn=teensy:avr:teensyLC:usb=serial,speed=48,opt=osstd,keys=en-us -ide-version=10805 -build-path C:\Users\Dell\AppData\Local\Temp\arduino_build_493692 -warnings=none -build-cache C:\Users\Dell\AppData\Local\Temp\arduino_cache_283853 -verbose C:\Users\Dell\Documents\Arduino\libraries\arf1\arf1.ino
    Using board 'teensyLC' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Using core 'teensy3' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
    Detecting libraries used...
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\sketch\arf1.ino.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\sketch\arf1.ino.cpp" -o "nul"
    Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\ADC.cpp
    Using cached library dependencies for file: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\ADC_Module.cpp
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\AnalogBufferDMA.cpp" -o "nul"
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\RingBuffer.cpp" -o "nul"
    Generating function prototypes...
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\sketch\arf1.ino.cpp" -o "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\preproc\ctags_target_for_gcc_minus_e.cpp"
    "C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\preproc\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/precompile_helper" "C:\Program Files (x86)\Arduino\hardware\teensy\avr/cores/teensy3" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692" "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr/cores/teensy3" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692/pch/Arduino.h" -o "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692/pch/Arduino.h.gch"
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\pch\Arduino.h.gch
    
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Dell\AppData\Local\Temp\arduino_build_493692/pch" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\sketch\arf1.ino.cpp" -o "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\sketch\arf1.ino.cpp.o"
    Compiling libraries...
    Compiling library "ADC"
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\libraries\ADC\ADC.cpp.o
    Using previously compiled file: C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\libraries\ADC\ADC_Module.cpp.o
    "C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -Os --specs=nano.specs -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -fpermissive -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m0plus -fsingle-precision-constant -D__MKL26Z64__ -DTEENSYDUINO=152 -DARDUINO=10805 -DARDUINO_TEENSYLC -DF_CPU=48000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Users\Dell\AppData\Local\Temp\arduino_build_493692/pch" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\AnalogBufferDMA.cpp" -o "C:\Users\Dell\AppData\Local\Temp\arduino_build_493692\libraries\ADC\AnalogBufferDMA.cpp.o"
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\AnalogBufferDMA.cpp: In member function 'void AnalogBufferDMA::init(ADC*, int8_t)':
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC\AnalogBufferDMA.cpp:163:8: error: 'class ADC' has no member named 'enableDMA'
    
       adc->enableDMA(adc_num);
    
            ^
    
    Using library ADC at version 8.0 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC 
    Error compiling for board Teensy LC.

  16. #41
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,914
    Yes, it is another place where the code changed that no longer had those methods on the top level class, but instead had to call the modules...

    Now I thought that @pedvide was going to add most/all of these back in for compatibility. So a couple of choices. Try to fix that line (and others like it in the AnalogBufferDMA.cpp file.
    Check out to see if maybe he already has a fix in hit github for this. If not could raise an issue against his library.

  17. #42
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    63
    There have been some changes in the ADC library since the snapshot taken when 1.52 was put together. I noticed that at one stage the original methods were put in, but marked deprecated (so they'd work but give warnings), but the latest version has them marked with error pragmas so they error out and give the suggested replacements.

  18. #43
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,914
    Personally I wish they were just left in... But as they say it is not my library.

  19. #44
    Member
    Join Date
    Oct 2019
    Location
    Calgary
    Posts
    63
    Quote Originally Posted by KurtE View Post
    Personally I wish they were just left in... But as they say it is not my library.
    I'm in full agreement with that. And at one time, that was the way things were done; upgrades didn't break existing functionality. But, like it or not, things are viewed differently now by a lot of folk and throwing the baby out with the bathwater seems quite commonplace.

  20. #45
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    112
    thanks for all of the feedback KurtE and Silverlock. looked at github - none of the files have changed for 2 months but i do
    not know how that might relate to the freeze date for 1.52. not sure what "raise an issue against his library" means. as far
    as fixing that line i guess i can try - nothing to loose. how would i private message the author to point him to this thread
    - send a pm to pevide ? and last but not least does anyone have the previous set of files (adc.cpp etc) or the previous
    zip from github ? if anyone has and there is a way to send to me i could try them and see if this goes away re first they
    were depreciated and now they cause errors ? thanks

  21. #46
    Senior Member
    Join Date
    Aug 2019
    Location
    southwest USA
    Posts
    112
    ADC problem TD 1.52 with TLC is resolved kind of, KurtE - i took your advice and tried to fix AnalogBufferDMA.cpp,
    commented out line 163 which is in a TLC only if. just for completeness tested back again to T36 and T4 and all
    is well. i don't know if the TLC even has DMA. if it does this "fix" might ruin your day in some high falootin kind of
    ADC servicing but i always just ask for a reading when i want it - often inside of an interval timer call. if you were
    trying to do any ADC at all i think that line would ruin your day anyway. below is a few lines out of the file showing
    context. the problematic ...enableDMA... is commented out.

    Code:
    #else
      // Kinetisl (TLC)
      // setup a DMA Channel.
      // Now lets see the different things that RingbufferDMA setup for us before
      _dmachannel_adc.source((volatile uint16_t&)(SOURCE_ADC_0));;
      _dmachannel_adc.destinationBuffer((uint16_t*)_buffer1, _buffer1_count * 2); // 2*b_size is necessary for some reason
      _dmachannel_adc.disableOnCompletion();    // ISR will hae to restart with other buffer
      _dmachannel_adc.interruptAtCompletion(); //interruptAtHalf or interruptAtCompletion
      _activeObjectPerADC[0] = this;
      _dmachannel_adc.attachInterrupt(&adc_0_dmaISR);
      _dmachannel_adc.triggerAtHardwareEvent(DMAMUX_ADC_0); // start DMA channel when ADC finishes a conversion
      _dmachannel_adc.enable();
    
      adc->startContinuous(adc_num);
    //  adc->enableDMA(adc_num);
    #ifdef DEBUG_DUMP_DATA
      dumpDMA_TCD(&_dmachannel_adc);
    #endif
    
    #endif

  22. #47
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    Will just live with it until someone discovers the source of the problem and it's cure. It's very irregular and no fixed pattern.
    More info. The T4x has the same problem in Win10 directly or through a USB3.1 hub. However, dropping the serial baud from 115200 to 19200 seems to have fixed the problem. Also, setting CPU speed to the first two overclock values causes an ADC sync capture to take longer than normal. That may be caused by the nanos() function not running correctly as it uses F_CPU. As long as I stay at 600MHz and baud 19200, it works OK.

  23. #48
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    The USB Baudrate setting is a empty function. It just does nothing.F_CPU is the current speed.
    You can expect issues from Overclocking.
    That's why it is OVERclocking.

  24. #49
    Senior Member
    Join Date
    Apr 2016
    Location
    St. Petersburg, FL
    Posts
    209
    The USB Baudrate setting is a empty function.
    Just found that out as there's not difference in output speed for settings from 1200 to 4M. If I set the rate in the device manager it keeps jumping back to 9600. Where is the rate set?

  25. #50
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,906
    Quote Originally Posted by Arctic_Eddie View Post
    Just found that out as there's not difference in output speed for settings from 1200 to 4M. If I set the rate in the device manager it keeps jumping back to 9600. Where is the rate set?
    It is always the highest possible speed. Independent of any settings anywhere. They are all ignored. On any Teensy 3.x or 4.x.
    Of course, the 4.x is much faster than the 3.x
    That's why I suggestest a SLOW hub for your old laptop.

Posting Permissions

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