USB not recognised custom board Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
PVS_Bram
Member
Posts: 8
Joined: Fri Jan 12, 2024 11:20 am

USB not recognised custom board

Post by PVS_Bram »

Hi everyone

I have developed a custom board using the XU316-1024-QF60B. The design is based/tested on the USB MULTICHANNEL AUDIO EVALUATION KIT which uses a XU316-1024-TQ128 and the firmware is based on the sw_usb_audio example. I used the eval kit to develop the firmware and determine which parts I would like to use.

The kit is configured to work as an Asynchronous USB stereo input/output, 48000 Hz, 32 bit with the I2S Codec as the master for the I2S line. This works great on the evaluation kit. Using the custom created board is where the troubles begin. The board configuration (.xn) files are changed (ONLY CHANGES MADE: Packages >> Package >> Type; DAC (XS1_PORT_1F --> XS1_PORT_1P)/ADC (XS1_PORT_1G --> XS1_PORT_1I) pins). Running the firmware works as expected and shows the prints in the terminal. When connecting the USB to the host machine (Windows) it is not recognised (Unkown USB Device (Device Descriptor Request Failed)). The only big difference between the eval kit and main board is that there are no CODECS on the custom board. I only need the I2S in-out signals for further use on another processor.

The schematic for the custom design is attached to this post.

Can anyone tell me what could cause the problem I have described above? Or how I could debug why the USB device descript fails?

Board Configuration File:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.xmos.com http://www.xmos.com">
  <Type>Board</Type>
  <Name>XS3-UnA-1024-QF60B</Name>

  <Declarations>
    <Declaration>tileref tile[2]</Declaration>
  </Declarations>

  <Packages>
    <Package id="0" Type="XS3-UnA-1024-QF60B">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS3-L16A-1024" Oscillator="24MHz" SystemFrequency="600MHz" ReferenceFrequency="100MHz">
          <Boot>
            <Source Location="bootFlash"/>
          </Boot>
          <Tile Number="0" Reference="tile[0]">
            <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
            <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
            <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>

            <!-- Various ctrl signals -->
            <Port Location="XS1_PORT_8D"  Name="PORT_CTRL"/>

            <!-- I2C -->
            <Port Location="XS1_PORT_1L"  Name="PORT_I2C_SCL"/>
            <Port Location="XS1_PORT_1M"  Name="PORT_I2C_SDA"/>

            <!-- Clocking --> 
            <Port Location="XS1_PORT_16B" Name="PORT_MCLK_COUNT"/>
            <Port Location="XS1_PORT_1D"  Name="PORT_MCLK_IN_USB"/>
            <Port Location="XS1_PORT_1A"  Name="PORT_PLL_REF"/>            
          </Tile>
          <Tile Number="1" Reference="tile[1]">            
            <!-- Audio Ports: I2S -->         
            <Port Location="XS1_PORT_1D"  Name="PORT_MCLK_IN"/>
            <Port Location="XS1_PORT_1B"  Name="PORT_I2S_LRCLK"/>
            <Port Location="XS1_PORT_1C"  Name="PORT_I2S_BCLK"/>
            <Port Location="XS1_PORT_1G"  Name="PORT_I2S_ADC0"/> <!-- 1G / 1I -->
            <Port Location="XS1_PORT_1F"  Name="PORT_I2S_DAC0"/> <!-- 1F / 1P -->
          </Tile>
        </Node>
      </Nodes>
    </Package>
  </Packages>
  <Nodes>
    <Node Id="2" Type="device:" RoutingId="0x8000">
      <Service Id="0" Proto="xscope_host_data(chanend c);">
        <Chanend Identifier="c" end="3"/>
      </Service>
    </Node>
  </Nodes>
  <Links>
    <Link Encoding="2wire" Delays="5clk" Flags="XSCOPE">
      <LinkEndpoint NodeId="0" Link="XL0"/>
      <LinkEndpoint NodeId="2" Chanend="1"/>
    </Link>
  </Links>
  <ExternalDevices>
      <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" PageSize="256" SectorSize="4096" NumPages="8192">
      <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
      <Attribute Name="PORT_SQI_SCLK"   Value="PORT_SQI_SCLK"/>
      <Attribute Name="PORT_SQI_SIO"  Value="PORT_SQI_SIO"/>
    </Device>
  </ExternalDevices>
  <JTAGChain>
    <JTAGDevice NodeId="0"/>
  </JTAGChain>

</Network>
XCC_FLAGS

Code: Select all

XCC_FLAGS_XTRA = $(BUILD_FLAGS)   -DI2S_CHANS_DAC=2 \
                                    -DI2S_CHANS_ADC=2 \
                                    -DNUM_USB_CHAN_IN=2 \
                                    -DNUM_USB_CHAN_OUT=2 \
                                    -DCODEC_MASTER=1 \
                                    -DXUA_I2S_N_BITS=32 \
                                    -DMAX_FREQ=48000 \
                                    -DMIN_FREQ=48000 \
                                    -DOUTPUT_FORMAT_COUNT=1 \
                                    -DXUA_DFU_EN=0
Thanks for you advice.

Bram
You do not have the required permissions to view the files attached to this post.


View Solution
Joe
Member++
Posts: 27
Joined: Sun Dec 13, 2009 1:12 am

Post by Joe »

I can't see the USB connector but one observation is USB_P net connected to USB_N and vice versa so may be that your USB lines are swapped.
User avatar
Ross
XCore Expert
Posts: 968
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Are you applying a master clock? if not that might cause some issues.
PVS_Bram
Member
Posts: 8
Joined: Fri Jan 12, 2024 11:20 am

Post by PVS_Bram »

Joe wrote: Tue Apr 23, 2024 9:16 am I can't see the USB connector but one observation is USB_P net connected to USB_N and vice versa so may be that your USB lines are swapped.
Swapping these lines solved the USB recognition problem. Thanks Joe!