YasarYY
Reaction score
3

Latest activity Postings About

    • YasarYY
      It may be caused by, at an SD card write/sync delay, DMA has wrapped around the buffer of 128 bytes three times (instead of one), so 256 samples are overwritten and lost. Try increasing buffer size to e.g. 512 or more.
    • YasarYY
      I stripped irrelevant code (for other functionality) and kept relevant code. Resulting pseudo-code is below. The rest is pretty much similar to input_adc.cpp. At header, add to private variables: static uint32_t recycle_samples_begin...
    • YasarYY
      Unfortunately, I cannot post the code here, sorry about that. But it is basically processing all buffered data since the last update(), similar to what is happening at input_adc.cpp update() method. Then it writes all the results to the file...
    • YasarYY
      That's right, that way DMA writes to a wider buffer span. Currently DMA reads 12 bit results of ADC and then writes 16 bit items by doing 4 bit zero padding. But, if I'm not missing something, making DMA item size 32 bit will still convey one ADC...
    • YasarYY
      It turned out that consecutive restarts are caused by DMA config params CITER and BITER are 15 bits, hence DMA can be programmed for a max of 32767 samples [1]. To wrap up; I sample at 705600 Hz (later subsampling to 352800 Hz), 16 times faster...
    • YasarYY
      Yep, I'm already doing it for its little help on reducing power consumption: // set disabled mode for 55 pins of Teensy 4.1 (https://www.pjrc.com/store/teensy41.html) for (int i = 0; i < 55; i++) pinMode(i, INPUT_DISABLE); And after this...
    • YasarYY
      @kd5rxt-mark, I didn't know that, that will definitely come in handy! Thank you 😌
    • YasarYY
      I tried with 128 and 2 GB SD cards, different classes, and observed different clicks. Their actual-write delays differ between 52 and 10 ms, respectively, and have different periods. Click periods alter accordingly. P.S.: I'm still trying to use...
    • YasarYY
      I applied the click patch. I altered below code, at input_adc.cpp, before IIR High-Pass Filter: Changed this: int16_t *s = capture_buffer + recycle_samples; to this: bool recycle_offset = (*capture_buffer) > (int16_t)(0.024f * 32768); int16_t *s...
      • 1767806087126.png
      • 1767806130830.png
      • 1767806165399.png
    • YasarYY
      Yes, it's the Teensy ADC. A choice being poor or good depends on the case. For my case, Teensy ADC is enough. I agree that I should've indicated my assessments are for my project and are not generalizable. Again, it's overkill for my case for...
    • YasarYY
      This sentence describes the essence of the cause of this issue 😌
    • YasarYY
      Hi Paul, thank you for the comments. Only a mic is connected to the Teensy, no other hardware. And mic's ground goes to Teensy's ground. I did run Teensy from a battery, its ground too is connected to Teensy, click behavior was the same. Having...
    • YasarYY
      Yes, I tried writing buffered data to file by several writeOut(512) calls, waiting while the file is busy each time. All writeOuts was successful, below code never printed "writeOut not Ok", but behavior didn't changed. bool writeOutOk = true...
    • YasarYY
      Thank you for the responses. I tried all of them, and below is the summary of the test journey. TLDR; none of the suggestions worked, so I'll patch click spikes at the software. * Place capacitors I placed a capacitor to 3.3v line near pin 23...
    • YasarYY
      Thank you for the response Mark. To where that bulk capacitance should be added? Between any 3.3v and ground lines, or do you recommend a specific place? 🤔
    • YasarYY
      Hi. On Teensy 4.1, when I acquire the audio from the ADC input, and save it to SD card, a periodic click occurs. I perform high sampling, and click period changes by sampling rate. At sampling rate 176400 Hz period is ~1.86 seconds, at 352800 Hz...
      • 1766734966571.png
    • YasarYY
      Looped back DAC to ADC directly and analyzed return signal using USB interface and Audacity. EXISTING DC REMOVAL The step response and spectral plot make it more evident how the existing algorithm is downsampling followed by a moving average...
    • YasarYY
      I realized this is the appropriate place for the thread I had previously started over here: https://forum.pjrc.com/threads/45695-DC-Offset-Removal-in-input_adc-cpp-input_adcs-cpp I have now got an audio pass-through program (2 different ones...
  • Loading…
  • Loading…
Back
Top