DanielMastroleo
New member
Hey everyone, i recently bought the teensy 4.0 and have for some time developed my own library for synthesizing different waveforms, filters and envelopes. Or lets say - all the fundamental parts in audio synthesis. I've seen the huge audio library that is available but feel that I'd rather use that which i have created on my own. Rather than integrating my code with the audio.h library my idea was to just setup DMA with I2s and go from there. The DMA is working correctly and at the moment is sending blocks of data from my audio chain (16 bit samples). Since my build is gonna be in mono i duplicate the samples and store them in an uint32. With the serial monitor i can confirm that the DMA buffer is being filled with the correct samples.
All the data is being sent to the I2S1_TDR0 register and I've tried setting up the I2s hardware by reverse engineering from what i read in the output_i2s.h library. This is where the problems appear. I can see that both clock pins are sending out a signal but the data pin is acting strange. Even if i fill the DMA buffer with all 0 is still get a signal on the data pin and a high pitched sound if i plug in my headphones to the uda1334 that i have hooked up on the breadboard. Im kind of a newbie and this is the first microcontroller that I've bought (aside from some school projects), so im really not getting anything from the imxrt manual or understanding how i should configure the hardware registers for my purposes.
Thanks in advance!
Daniel
All the data is being sent to the I2S1_TDR0 register and I've tried setting up the I2s hardware by reverse engineering from what i read in the output_i2s.h library. This is where the problems appear. I can see that both clock pins are sending out a signal but the data pin is acting strange. Even if i fill the DMA buffer with all 0 is still get a signal on the data pin and a high pitched sound if i plug in my headphones to the uda1334 that i have hooked up on the breadboard. Im kind of a newbie and this is the first microcontroller that I've bought (aside from some school projects), so im really not getting anything from the imxrt manual or understanding how i should configure the hardware registers for my purposes.
Thanks in advance!
Daniel