I'm so, so sorry to post but I'm not sure how to find this information. I know it must be somewhere in the forum but my search terms aren't fruitful.
To start out, I want to make clear that I am not that interested in the audio library, but need to use I2S so hopefully this is an okay place to ask. My primary goal is to output a signal on one channel and to read it on 1-2 other channels and then multiply the signals together and low-pass (i.e. a lock-in amplifier using a CODEC).
I've read a bunch of other posts about the I2S interface speed and I understand there is a library that you can do a define to change the speed.
I have this CODEC that can do 768kHz at 32-bit stereo in and out (https://www.ti.com/product/TAC5212), and I cannot imagine this will work with the Teensy 4.0 I2S interface but with my apologies I can't quite tell how to guess what the hardware limit is.
I found
of course, and Figure 31/Table 50 says the hardware can go down to a 15ns clock period. I'm not 100% sure how to use that to predict audio sample rates but I am estimating with 1/15ns (MCLK freq) / (32-bits * 4 channels) = 520kHz.
So assuming that it's physically unable to reach 768kHz, does it seem reasonable for it to run the I2S interface at 384kHz? It seems like 192kHz is readily possible, but for this application the faster the better because it's not real audio.
Relatedly but a different question I suppose -- is there a reason to use the audio library to multiply the signal received by a reference waveform? I know there's a multiply function in the audio library but this is pretty high speed, I'm guessing that the people who wrote the audio library are way better programmers than me so I wonder if it will be faster to do that than literally do multiplication at each received sample, get the envelope, and then low-pass.
Again, apologies because this feels like a question that has been answered.
To start out, I want to make clear that I am not that interested in the audio library, but need to use I2S so hopefully this is an okay place to ask. My primary goal is to output a signal on one channel and to read it on 1-2 other channels and then multiply the signals together and low-pass (i.e. a lock-in amplifier using a CODEC).
I've read a bunch of other posts about the I2S interface speed and I understand there is a library that you can do a define to change the speed.
I have this CODEC that can do 768kHz at 32-bit stereo in and out (https://www.ti.com/product/TAC5212), and I cannot imagine this will work with the Teensy 4.0 I2S interface but with my apologies I can't quite tell how to guess what the hardware limit is.
I found
of course, and Figure 31/Table 50 says the hardware can go down to a 15ns clock period. I'm not 100% sure how to use that to predict audio sample rates but I am estimating with 1/15ns (MCLK freq) / (32-bits * 4 channels) = 520kHz.
So assuming that it's physically unable to reach 768kHz, does it seem reasonable for it to run the I2S interface at 384kHz? It seems like 192kHz is readily possible, but for this application the faster the better because it's not real audio.
Relatedly but a different question I suppose -- is there a reason to use the audio library to multiply the signal received by a reference waveform? I know there's a multiply function in the audio library but this is pretty high speed, I'm guessing that the people who wrote the audio library are way better programmers than me so I wonder if it will be faster to do that than literally do multiplication at each received sample, get the envelope, and then low-pass.
Again, apologies because this feels like a question that has been answered.
Last edited: