Hello,
Would someone share with me some sample code for the WM8904 ADC side? Ideally, I would process one sample at a time.
Thanks,
Frank
Hello,
Would someone share with me some sample code for the WM8904 ADC side? Ideally, I would process one sample at a time.
Thanks,
Frank
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/ ?
Correct.
>Have you looked at the resources that Cirrus provide?
>https://www.cirrus.com/support/
I didn't find anything for SAM code there.
I just found some code here:
https://github.com/avrxml/asf/blob/master/sam/components/audio/codec/wm8904/example/wm8904_example.c
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.
Frank
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.
Relevant Resources • Synchronous Serial Controller (SSC) of SAMV71 Devices to Output an Audio Stream Through the On-board WM8904 CODEC http://asf.atmel.com/docs/latest/ sam.components.audio.codec.wm8904.example.samv71_xplained_ultra/html/index.html • Synchronous Serial Controller (SSC) of SAM3S Devices to Output an Audio Stream Through the On-board WM8731 CODEC http://asf.atmel.com/docs/latest/sam.components.audio.codec.wm8731.example.sam3x_ek/html/ index.html • ASF SSC in I2S Mode Example – EVK 1100 http://asf.atmel.com/docs/latest/avr32.drivers.ssc_i2s.example.evk1100/html/index.html • ASF SSC in I2S Mode Example – EVK 1101 http://asf.atmel.com/docs/latest/avr32.drivers.ssc_i2s.example.evk1101/html/index.html • Connecting the Atmel ARM-based Serial Synchronous Controller (SSC) to an I2S-compatible Serial Bus http://www.atmel.com/Images/doc6020.pdf • How to use the SSC in I2S mode http://www.atmel.com/Images/doc32127.pdf • Usage of XDMAC on SAM S/SAM E/SAM V http://www.atmel.com/Images/Atmel-
I didn't find anything for SAM code there.
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,
https://asf.atmel.com/docs/lates...
->
https://asf.microchip.com/docs/l...
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.
Good stuff!
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.
Hello all,
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.