- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have modified the CE220762_PDM_I2S example project to allow for switching between streaming audio from the PDM to codec via I2S v.s. receiving data from the SDOut of the codec and inputting it back to codec via the I2S. Streaming audio from PDM to codec works fine but when I get the data out of the Codec via the I2S, I get white noise. I have attached the project and wanted to make sure that I am setting the DMAs correctly. I am using a different codec than that of the PSoC6 Kit so I have omitted my codec's code from the project
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I suspected it was an I2S setting issue. For Rx, I had to set SDI latching time to Half-clock delayed for it to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are getting data from the I2S RX FIFO, the data is already stereo (left and right), so there is no need to use two DMAs (PlayLeft and PlayRight).
Simply stream directly from I2S RX FIFO to the SRAM (1st DMA) and from SRAM to I2S TX FIFO (2nd DMA).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I am aware of that but that does not explain the white noise I am receiving. I have updated the project to use only one DMA if I am getting the stream from RX FIFO to SRAM. Are there any issues with my initializing of DMA or I2S or any other things that I may be doing incorrectly ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I still see two DMAs connected to the I2S tx_dma in your latest project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yes but I disable one when I keep SW2 pressed. Upon release, it uses two DMA for the record path from the PDM Mic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest to simplify your project. Remove the PDM/PCM from your design and make a simple loop back from I2S TX FIFO to I2S RX FIFO.
You might even try first without DMAs to confirm you are getting good data from your codec.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do I test it without using DMAs ? Do you mean using the codec's internal loop back path from ADC to the DAC ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Refer to the code example https://www.cypress.com/documentation/code-examples/ce218636-psoc-6-mcu-inter-ic-sound-i2s-example
No need to use ADC or DAC. Only use the I2S component to receive and send audio data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As I suspected it was an I2S setting issue. For Rx, I had to set SDI latching time to Half-clock delayed for it to work.