Would someone share with me some sample code for the WM8904 ADC side? Ideally, I would process one sample at a time.
the WM8904 ADC
You mean this: https://www.cirrus.com/products/wm8904/ ?
Have you looked at the resources that Cirrus provide?
> You mean this: https://www.cirrus.com/products/wm8904/ ?
>Have you looked at the resources that Cirrus provide?
I didn't find anything for SAM code there.
I just found some code here:
The wm8904_example.c is the same code as what I just get through File->New->example project and search with WM8904. I will post my results.
P.S. I was trying to get the links from page 9 of TB3715 (What is SSC How to Configure SSC for Audio aaplications 90003175) and the asf.atmel.com the links just forwarded directly to microchip.com. the atmel.com links without asf in the front seem to work.
• Synchronous Serial Controller (SSC) of SAMV71 Devices to Output an Audio Stream Through the
On-board WM8904 CODEC
• Synchronous Serial Controller (SSC) of SAM3S Devices to Output an Audio Stream Through the
On-board WM8731 CODEC
• ASF SSC in I2S Mode Example – EVK 1100
• ASF SSC in I2S Mode Example – EVK 1101
• Connecting the Atmel ARM-based Serial Synchronous Controller (SSC) to an I2S-compatible Serial
• How to use the SSC in I2S mode
• Usage of XDMAC on SAM S/SAM E/SAM V
you can't expect Cypress - or any other manufacturer - to provide specific examples for every possible 3rd-part host processor.
But remember that the ADC neither knows nor cares what microcontroller you're using - so you should be able to adapt their example code to the SAM ...
Just found that I must substitute atmel for microchip and the links work. For example,
The wm8904_example.c demo works. I put a function generator into the microphone and see it reproduced on the headphone output.
I just have to add DMA interrupt handlers so I could do processing with the buffers on the ADC and DAC sides.
Please see Tip #5 in my signature, below:
It's getting resolved. I'm not there yet. I put a breakpoint and made a watch of the AudioBuffer buffer. The buffer is all zeros even after I run and pause the program. I don't know the cause yet.
I am going to stop this thread. I am marking the post where I put the link as the solution. I didn't resolve the audiobuffer through this sample code. I made another thread. I am posting functional code over there that does not use XDMAC while still having functional ADC and DAC using interrupt on SSC on a per sample basis.
© 2020 Microchip Technology Inc.