T
Reaction score
0

Latest activity Postings About

    • T
      I know this thread is a little bit old... I tried to use your code, but it seems that it makes my Teensy 4.1 crash after a few seconds : #include <Audio.h> #include <arm_const_structs.h> #include <utility/imxrt_hw.h> #include...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      This time, I think it is good enough! To do this, I a added a delay of 1/4 of buffer : delay(100); digitalWrite(1,LOW); i2s_in.begin(); i2s_out.begin(); delay(100); digitalWrite(1,HIGH); while(digitalRead(0) == HIGH)...
      • triggered.png
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      I found something! I modified the I2S audio classes by removing the call to begin() in the lines: AudioInputI2S(void) : AudioStream(0, NULL) { begin(); } AudioOutputputI2S(void) : AudioStream(0, NULL) { begin(); } And called begin only after...
      • almost_trig.png
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      Also, is it possible to stop i2s/dma and restart it when needed, so everything start at the same time? I tried to manipulate I2S1_RCSR and I2S1_TCSR but it seems to break everything. Actually, my problem is a little bit like trying to measure...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      I understand that you mentioned it's impossible to trigger I2S due to sigma-delta modulation, but I'm unsure if I really understood what I want: I'm not aiming to trigger I2S for every sample; rather, I only want the initiation of data...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      I just tested something, and it's very strange: if I place "Serial.println(input_buffer[buffer_ind]);" before the line "I2S1_TDR0 = (uint32_t)output_buffer[buffer_ind]*0xffff;", the data are correct. However, if I place it after, I obtain the...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      Yes, I know... but this seems to be the only way it even works... At least the values obtained with Serial.print() in the ISR seem correct (I tested it by emitting a sine wave with another speaker). Also, I didn't mention this earlier, but the...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      Alright, I've implemented the triggering parts, but I'm getting some very strange results... The values I'm seeing in the isr function are different from the values I obtain from the getData function! New code: #include "I2Sone_input.h"...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      It works very well now! But... I still have a doubt: I don't fully understand how stereo works in the I2S audio library. To clarify, I don't see where the two channels are represented in the I2S registers (I2S1_RDR0 and I2S1_TDR0). Since I only...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      I corrected the mistake with volatile. (I also forgot to activate the interrupt...). However, I'm still obtaining 0: #include "I2Sone_input.h" volatile uint16_t data_input; void Triggeredi2s::begin(void) { config_i2s(true)...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      Depending of the method I use, I obtain 0 or 65535 (=2^16-1) as result... I clearly don't really know what I am doing, however, I verified with my oscilloscope that the the i2s communication is active! Header file : #include <Arduino.h>...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      Sorry for the beginner question, but I'm having trouble understanding how to retrieve data from I2S. I noticed in the file i2s_input.cpp that data retrieval is accomplished with the line: dma.TCD->SADDR = (void *)((uint32_t)&I2S1_RDR0 + 2)...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      For the context, the best way is to see my old thread : https://forum.pjrc.com/index.php?threads/triggering-problem.74361/ By "continuous recording sample by sample and transfer them to some buffer when triggered", I mean copying data from i2s...
    • T
      TeensyPhonon replied to the thread Triggered I2S.
      So, the only way is to do continuous recording sample by sample and transfer them to some buffer when triggered? Or do i need to use analog stuff?
    • T
      TeensyPhonon posted the thread Triggered I2S in Audio Projects.
      Hi everyone, Unfortunately, I require a very precise and repeatable method to initiate sound emission and reception on several Teensy 4.1 boards equipped with SPH0645 and MAX98357A I2S microphones and amplifiers. Currently, using the existing...
    • T
      TeensyPhonon replied to the thread Triggering problem.
      I think maximum 1/10 of period at 10kHz, so 10us... worst case...
    • T
      TeensyPhonon replied to the thread Triggering problem.
      Actually, in reality, I have 12 teensy for emission, so I really need the delay to be constant every time and everywhere... Also, my microphones and amplifiers are I2S. For the time reversal stuff: 1-The teensy (only one at a time) play a...
    • T
      TeensyPhonon replied to the thread Triggering problem.
      What is the best way to do it actually? Is that even possible with teensy?
    • T
      TeensyPhonon replied to the thread Triggering problem.
      So, perhaps a class which pass it's input to it's output only when triggered (and placed between the output queue and I2S) could work ?
    • T
      TeensyPhonon replied to the thread Triggering problem.
      I need this precision because any variation of phase completely messes the multi-elements time reversal technique I want to use (if you don't know what it is: https://en.wikipedia.org/wiki/Time_reversal_signal_processing).
    • T
      TeensyPhonon replied to the thread Triggering problem.
      Is there a way to make this delay being always the same without rewriting the audio module code ?
    • T
      I am trying to do a synchronized emission and reception between two teensy 4.1 (I use the SPH0645 as the microphone and the MAX98357A as an amplifier for the speakers). Here is my code for recording : digitalWrite(1,LOW); Q_in_L.clear(); for...
      • test_sin.png
  • Loading…
  • Loading…
Back
Top