Page 2 of 2

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Fri Apr 21, 2017 9:49 pm
by anhn@nytec.com
a follow up on the last reply. Looking at the device manager on my windows 10 PC, when the USB is connected to my XMOS hw, USB controller shows it as "unknown USB device" and indicates the following:

A request for the USB device descriptor failed.

if the same USB cable is connected to the eval board (xCore-200 Multichannel audio platform v2.0) the Thesycon USB audio control panel app does detect the USB audio device.

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Sun Apr 23, 2017 8:58 am
by infiniteimprobability
This still sounds like the audio task is getting stuck.. BCLK comes from the MCLK in hardware. Where abouts is the code when you query it in the debugger?
Double check your port assignment...particularly MCLK. Make sure it's the right tile

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Mon Apr 24, 2017 2:29 pm
by anhn@nytec.com
MCLK is defined to be at port 1N per the .xn file as defined below. Port 1N on the XU208 is pin X0D37 (ie pin 64 on the chip). There is only one tile on the XU208-128-TQ64 chip.

<Port Location="XS1_PORT_1N" Name="PORT_MCLK_IN"/>

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Mon Apr 24, 2017 3:19 pm
by anhn@nytec.com
Started from power cycle this morning, loaded and ran code on the debugger ie out of RAM, and the Theyson USB Audio control panel detects and is connected to USB audio device on the xCore. sample rate detected as 48KHz per my fixed setting in the sw. but not able to play a wav file (the same wave I was able to play when using the eval board). a pop window comes up and says "item is in a format we don't support". again I have a 24Mhz oscillator going to the CLK pin as well as my MCLK pin.

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Mon Apr 24, 2017 6:21 pm
by anhn@nytec.com
another update. I set the min frequency to 44100 and I am getting USB audio streaming to my custom codec. but it only works when running on the debugger ie RAM. it does not work out of flash. the flash download appears successful from the console status. a warning I did get the following warning which seems benign. The second below is the indication that the flash download was successful.

Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
...
Site 0 has finished successfully.

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Mon Apr 24, 2017 7:27 pm
by anhn@nytec.com
Recap. after it flashes, I would power down the device and remove the JTAG. the system comes up and when the USB is connected, the USB is not detected. The flash used is the same one that is on the xCore-200 Multichannel audio platform v2.0 and connected using the same pin layout as on the v2.0 platform. the pin layout match the one on the XU208 that I am using on my custom hw. The build makefile has the QUAD_SPI_FLASH defined and set to 1; actually build is not successful without the QUAD_SPI_FLASH defined.

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Wed Apr 26, 2017 7:07 pm
by anhn@nytec.com
I verified that flash boot up is fine. I tested a flash sw load toggling some GPIO pins and that sw runs fine from power cycle. It's the usb audio reference sw that does not run. I am not able to get USB detection/enumeration when the sw is loaded from flash. again, the sw runs fine when loaded through the debugger. is there a way to debug this ie suspend sw run after it has been loaded from flash and actively running?

thanks,

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Thu May 04, 2017 8:45 am
by infiniteimprobability
is there a way to debug this ie suspend sw run after it has been loaded from flash and actively running?
Yes - a simple way to get processor state is to use xrun --dump-state <my_file.xe>

A more powerful way is to use xgdb from the command line:

Code: Select all

xgdb <my_file.xe>
attach
info threads
etc..
use of attach rather than connect means it will attach to a running chip rather than boot a new image

Re: Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings

Posted: Thu May 04, 2017 9:37 am
by AlexAdvice
>again I have a 24Mhz oscillator going to the CLK pin as well as my MCLK pin.

I think It is not an issue - I have 24MHz for CPU, and also this clock substitute MCLK is the external one is not available. And there is no problem with wav playing.
Except the sample rate, of course.