PSoC3 I2S and USBFS not playing nice. Need a CyHero!

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 I've run into a problem using I2S and USBFS on a PSoC3. It is reproducible on a CY8CKIT-001 without any other circuitry. You will need an oscilloscope to observe the defect. I can only guess it's is a problem with routing or the silicon. I have no idea how to fix those types of issues so I need a hero to rescue me.

   

Steps to reproduce:

   

Check out the project from https://github.com/ham21/peaberry

   

Use commmit 94d573afa835d515c7824760d305b657fbf8fb46 if you're looking at old forums and it's already fixed.

   

Comment out the following lines. main.c: 26, 30-39, 42. pcm3060.c: 180-183.

   

Change the chip to CY8C3866AXI-040. Set up voltages in cydwr.

   

Connect USB to a computer. Ignore the request for a driver. Windows will make the dev board your default sound device. You must change Windows sound setting back to something real.

   

Reboot the dev board to clear the buffers *after* windows sound settings are back to normal.

   

Hook up a scope to p12[2] (I2S SDO / PCM3060 DIN). Observe all zeros (flat line).

   

Use something like Sound Recorder or SDR software to record the audio stream from "Peaberry Radio".  Make sure you aren't sending to Peaberry Radio or you'll not have buffers full of zeros.

   

While recording, observe random 1s on p12[2].  Stop recording and this goes away.

   

You can use the debugger around pcm3060.c:205 to observe the transmit buffers remain at all zeros and there are no buffer underruns. I've exhausted all my ideas about it being a software defect.

   

Bonus points for a better way to do the 24-bit endian swap!

   

-david

0 Likes
3 Replies
Anonymous
Not applicable

 Fixed! Found a sneaky pointer. Still interested in learning a better way to do the 24-bit endian swap. What I'm using is the best I could figure out on my own.

   

-david

0 Likes
Anonymous
Not applicable
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Thats a great site, too bad this forum does not have a file section.

   

 

   

Sigh.

   

 

   

Regards, Dana.

0 Likes