2 Replies Latest reply on Jan 4, 2017 1:46 AM by userc_38501

    UAC (Streaming from SPI Flash) problem



      I tried running the UAC example along with Cypress CX3 SDK (1.3).


      I flashed a wav file (50Hz Sine wave) generated for 48kHz sampling, 16 bit stereo to CX3 SPI Flash using control center. Then I ran the CX3 UAC example (which streams audio from SPI flash onboard). I used Audacity to record the streaming audio in PC. The recorded wave was different from the audio file which I flashed on to the SPI flash. It was noisy and had no relation.


      Am I doing it wrong? Or is there any other way to validate the audio streaming ?

        • 1. Re: UAC (Streaming from SPI Flash) problem



          There could be a possibility that the noise on your board led to the corruption of data. Can you please verify the same. In the original audio file, compare the bytes at certain locations with what was written on the SPI Flash (You can use the SPI read APIs to read the same).


          Also, you can compare the audio data that is sent over UAC in the same way by using USB Protocol analysers (like USBLyzer) etc.,




          - Madhu Sudhan

          • 2. Re: UAC (Streaming from SPI Flash) problem



            To run a real audio streamer with 16kHz sampling, 16 bit per sample with stereo audio, what shall be the isochronous packet size? Do I have to change the descriptors?.


            I tried the same UAC streamer (stream from not SPI flash but from an I2S to SPI bridge). The sampling rate from the source was 16kHz. I reused the same size of  96 bytes for one ISO packet.  But in this case, the audacity had to be configured for 48kHz. After recording, I had to playback at 16kHZ rate. Is it 96 bytes/ISO packet for 16kHz sampling also?


            Can you give me some sample code for this?