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.
Porting USB Audio 2.0 for XU208-128-TQ64 / build warnings
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
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
Double check your port assignment...particularly MCLK. Make sure it's the right tile
Engineer at XMOS
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
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"/>
<Port Location="XS1_PORT_1N" Name="PORT_MCLK_IN"/>
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
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.
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
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.
Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
...
Site 0 has finished successfully.
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
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.
-
- Member
- Posts: 14
- Joined: Thu Apr 13, 2017 4:50 pm
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,
thanks,
-
Verified
- XCore Legend
- Posts: 1156
- Joined: Thu May 27, 2010 10:08 am
Yes - a simple way to get processor state is to use xrun --dump-state <my_file.xe>is there a way to debug this ie suspend sw run after it has been loaded from flash and actively running?
A more powerful way is to use xgdb from the command line:
Code: Select all
xgdb <my_file.xe>
attach
info threads
etc..
Engineer at XMOS
-
- XCore Addict
- Posts: 150
- Joined: Sun Feb 23, 2014 11:30 am
>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.
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.