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

Thread: Strange behavior on certain functions

  1. #1
    Senior Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    135

    Strange behavior on certain functions

    I've traced down an unexpected behavior (in this case) to enabling any control of envelope function in the module "sequencer.h." If I uncomment any of the envelope controls, the machine will intermittently lock up and play garbage tones until coming back into synch. This is behavior I have observed in the past, sometimes after just importing a sketch that has one or two small changes, suddenly it "hangs" like this until I revert to the old sketch, even though the changes are simple things like connecting a mixer input to a different output. In this case, everything was working until suddenly it wasn't. I don't have jtag and sophisticated debug tools and I truly do not know how to troubleshoot this bug.
    Attached Files Attached Files

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,673
    Just saw reference to this on another thread?

    It seems there have been 13 users that clicked this post - but not seeing enough info or info readily enough presented there were no ideas ... and 6 views of the ZIP.

    Packing the code in a zip makes one pause - having to pull, unpack, then open in editor to even see what is involved. Posting the code or a github link making it readily viewable can help with that ... and least as I view posts.

    Also missing details like what Teensy, hardware and purpose can matter to folks interest level or understanding if they might help. Reading now sequencer/envelope that says AUDIO which limits the audience to a select few who see the post.

    Never good when posts get no feedback ... but when that happens it is good to post results of ongoing efforts or added info that may help readers participate or be intrigued with an idea, or even pop up on a day when somebody visits.

    One note might be to print out the Audio Usage notes on CPU% and MEMORY etc that might suggest if something is starving/overwhelming the system - there is an example sketch showing usage.

  3. #3
    Senior Member
    Join Date
    Apr 2020
    Location
    Tucson
    Posts
    135
    OK I nailed down the problem. In init.h the configuration of the sgtl5000

    sgtl5000_1.enable();
    sgtl5000_1.adcHighPassFilterDisable();
    sgtl5000_1.inputSelect(myInput);
    sgtl5000_1.micGain(36);
    sgtl5000_1.volume(1.0);

    If I comment out sgtl5000_1.adcHighPassFilterDisable(); it works fine. I tried adding that line before enabling and after, it does the same thing: sporadic lockups where it just spits out tones for a few secs then goes back to nominal. Repeats about every ten seconds.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    12,673
    Odd - no idea what that does - but the code suggests it modifies a normal feature of the sgtl5000 hardware - nothing else?
    Code:
    unsigned short AudioControlSGTL5000::adcHighPassFilterDisable(void)
    {
    	return modify(CHIP_ADCDAC_CTRL, 1, 3);
    }
    That might suggest it is fixing a symptom of the problem? Not knowing the hardware or actual effect - it seems there is something else triggering that - given it is a standard part of every init using that?

    It is mentioned in the Audio ..\hardware\teensy\avr\libraries\Audio\gui\index.h tml documentation - maybe some clue there?
    Completely disable the analog input filter. DC and sub-audible
    low frequencies are allowed to enter the digital signal. This
    openaudio.blogspot.com/2017/03/teensy-audio-board-self-noise.htmlmay
    reduce noise</a> in some cases.

Posting Permissions

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