XMOS USB not enumerating

Discussions about USB Audio on XMOS devices
xmos_user123
Member++
Posts: 19
Joined: Tue Oct 01, 2024 1:43 am

XMOS USB not enumerating

Post by xmos_user123 »

We're using an XMOS S2-UE16A-512-FB236 with QSPI W25Q16JV on a custom board. When I try to flash the XMOS the first time, I am able to see BCLK and LRCLK, however usb enumeration doesn't show up on my MacBook system reports. Additionally, when I try to reflash with a new image, the xflash function hangs and produces the following error:

Code: Select all

xcc -w -Xmapper --dontenablesodlinks  -x xn "target-xn-v0-dcc00625" -O2 -lquadspi -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fw-3a317d7a" -o "fw-ba84ee36" 
XFlash_Utils::BuildRunCommand : xrun --io fw-ba84ee36 
xrun: First stage multi-node boot failed, please check XN file and Xmos link connectivity

Error: F03013 Failed to run : 0x309240be0.
I'm only able to reflash after I erase using

Code: Select all

xflash --erase-all
. Upon power cycle, the XMOS does not boot properly from flash, and the BCLK and LRCLK don't come up anymore. This is the .xn file I'm using with the appropriate ports selected:

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" ManuallySpecifiedRouting="true">
  <Type>Board</Type>
  <Name>XS2 MC Audio</Name>
  <Declarations>
    <Declaration>tileref tile[2]</Declaration>
    <Declaration>tileref usb_tile</Declaration>
  </Declarations>
  <Packages>
    <Package id="0" Type="XS2-UEnA-512-FB236">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS2-L16A-512" Oscillator="24MHz" SystemFrequency="500MHz" referencefrequency="100MHz">
          <Boot>
            <Source Location="SPI: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"/>
        
            <!-- Audio Ports -->         
            <Port Location="XS1_PORT_1A"  Name="PORT_PLL_REF"/>
            <Port Location="XS1_PORT_1D"  Name="PORT_MCLK_IN"/>
            <Port Location="XS1_PORT_1E"  Name="PORT_I2S_LRCLK"/>
            <Port Location="XS1_PORT_1F"  Name="PORT_I2S_BCLK"/>
            <Port Location="XS1_PORT_1G"  Name="PORT_I2S_DAC0"/>
            <port Location="XS1_PORT_1I"  Name="PORT_I2S_DAC1"/>
            <port Location="XS1_PORT_1K"  Name="PORT_I2S_DAC2"/>
            <port Location="XS1_PORT_1M"  Name="PORT_I2S_DAC3"/>
            <Port Location="XS1_PORT_1H"  Name="PORT_I2S_ADC0"/>
            <Port Location="XS1_PORT_1J"  Name="PORT_I2S_ADC1"/>
            <Port Location="XS1_PORT_1L"  Name="PORT_I2S_ADC2"/>
            <Port Location="XS1_PORT_1N"  Name="PORT_I2S_ADC3"/>
            <!-- <Port Location="XS1_PORT_4A"  Name="PORT_I2C"/> -->
            <!-- <Port Location="XS1_PORT_1M"  Name="PORT_DSD_DAC0"/> -->
            <!-- <port Location="XS1_PORT_1M"  Name="PORT_DSD_DAC1"/> -->
            <!-- <Port Location="XS1_PORT_1M"  Name="PORT_DSD_CLK"/> -->
            <!-- <Port Location="XS1_PORT_1M"  Name="PORT_ADAT_OUT"/>  D: COAX E: OPT  -->
            <!-- <Port Location="XS1_PORT_1M"  Name="PORT_SPDIF_OUT"/> D: COAX E: OPT  -->
          </Tile>
          <Tile Number="1" Reference="tile[1]">
            <Port Location="XS1_PORT_1H"  Name="PORT_USB_TX_READYIN"/>
            <Port Location="XS1_PORT_1J"  Name="PORT_USB_CLK"/>
            <Port Location="XS1_PORT_1K"  Name="PORT_USB_TX_READYOUT"/>
            <Port Location="XS1_PORT_1I"  Name="PORT_USB_RX_READY"/>
            <Port Location="XS1_PORT_1E"  Name="PORT_USB_FLAG0"/>
            <Port Location="XS1_PORT_1F"  Name="PORT_USB_FLAG1"/>
            <Port Location="XS1_PORT_1G"  Name="PORT_USB_FLAG2"/>
            <Port Location="XS1_PORT_8A"  Name="PORT_USB_TXD"/>
            <Port Location="XS1_PORT_8B"  Name="PORT_USB_RXD"/>
            
            <!-- Audio Ports -->
            <Port Location="XS1_PORT_16B" Name="PORT_MCLK_COUNT"/>              
            <Port Location="XS1_PORT_1O"  Name="PORT_MCLK_IN_USB"/>
            <Port Location="XS1_PORT_1M"  Name="PORT_MIDI_IN"/>
            <Port Location="XS1_PORT_1N"  Name="PORT_MIDI_OUT"/>
            <Port Location="XS1_PORT_1L"  Name="PORT_ADAT_IN"/> <!-- P: COAX O: OPT -->
            <Port Location="XS1_PORT_1P"  Name="PORT_SPDIF_IN"/>  <!-- P: COAX O: OPT -->
          </Tile>
        </Node>
        <Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
        </Node>
      </Nodes>
      <Links>
        <Link Encoding="5wire">
          <LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
          <LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
        </Link>
      </Links>
    </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="4,4" Flags="XSCOPE">
      <LinkEndpoint NodeId="0" Link="XL0"/>
      <LinkEndpoint NodeId="2" Chanend="1"/>
    </Link>
  </Links>
  <ExternalDevices>
    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="W25Q16DV" 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"/>
      <Attribute Name="QE_REGISTER" Value="flash_qe_location_status_reg_1"/>
      <Attribute Name="QE_BIT" Value="flash_qe_bit_1"/>
    </Device>
  </ExternalDevices>
  <JTAGChain>
    <JTAGDevice NodeId="0"/>
    <JTAGDevice NodeId="1"/>
  </JTAGChain>
</Network>

and this is the makefile config I'm trying to run:

Code: Select all

INCLUDE_ONLY_IN_CUSTOM =
XCC_FLAGS_CUSTOM = $(BUILD_FLAGS)   -DI2S_CHANS_ADC=8 \
                                    -DI2S_CHANS_DAC=8 \
                                    -DNUM_USB_CHAN_IN=8 \
                                    -DNUM_USB_CHAN_OUT=8 \
                                    -DXUA_PCM_FORMAT=XUA_PCM_FORMAT_TDM \
                                    -DMAX_FREQ=48000 \
                                    -DXUA_POWERMODE=XUA_POWERMODE_SELF \
                                    -DMIXER=0 \
                                    -DXUA_DFU_EN=0
User avatar
Ross
Verified
XCore Legend
Posts: 1119
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Does this application boot using xrun?

What tools version is in use here please?
Technical Director @ XMOS. Opinions expressed are my own
xmos_user123
Member++
Posts: 19
Joined: Tue Oct 01, 2024 1:43 am

Post by xmos_user123 »

I can see BCLK and LRCLK using xrun but I don’t see it enumerate as a USB device on my Mac. I think this is because the host attempts to find a USB device upon power up but the XMOS doesn’t respond so it stops trying? The USB_P net is at 3.3V the entire time.

I’m using XTC version 15.3.0 but I also tried 15.1
User avatar
Ross
Verified
XCore Legend
Posts: 1119
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

I'd suggest concentrating on getting it running via JTAG (i.e. xrun) then booting from flash. This is because under the hood xflash essentially needs to use xrun.

Are you sure these LRCLK and BCLK signals are coming from the xcore and not some other hardware coming up in master mode?

Can you post the result of xrun --dumpstate <binary_name>.xe?

My guess is that there is a HW issue at play here.
Technical Director @ XMOS. Opinions expressed are my own
xmos_user123
Member++
Posts: 19
Joined: Tue Oct 01, 2024 1:43 am

Post by xmos_user123 »

This is the output of the --dumpstate. I can do xrun multiple times without the program hanging but I don't see the USB enumerate:

Code: Select all

bash-3.2$ xrun --dumpstate bin/CUSTOM/app_usb_aud_xk_216_mc_CUSTOM.xe 
reset post-attach
Done.

***** Active Cores *****
  Id   Target Id            Frame 
* 1.1  tile[0] core[0] (hw) XUA_AudioHub (clk_audio_mclk=<optimized out>, clk_audio_bclk=774, p_mclk_in=66304, c_aud=<optimized out>, p_lrclk=<optimized out>, p_bclk=<optimized out>, p_i2s_dac=..., p_i2s_adc=...) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/audiohub/xua_audiohub.xc:446
  2.1  tile[1] core[0] (hw) XUD_GetSetupBuffer (e=298632, buffer=<optimized out>, datalength=0x7fe04) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:238
  2.2  tile[1] core[1] (hw) 0x000410d8 in XUA_Buffer_Decouple (c_mix_out=2147680258) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/decouple/decouple.xc:800
  2.3  tile[1] core[2] (hw) 0x00045a14 in _write_periph_32_on_chanend ()
  2.4  tile[1] core[3] (hw) XUA_Buffer_Ep (c_aud_out=2147681794, c_aud_in=2147683330, c_aud_fb=2147682818, c_sof=2147680770, p_off_mclk=<optimized out>, c_aud_ctl=2147683586) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/ep/ep_buffer.xc:408

Thread 2.4 (tile[1] core[3] (hw)):

***** Call Stack *****
#0  XUA_Buffer_Ep (c_aud_out=2147681794, c_aud_in=2147683330, c_aud_fb=2147682818, c_sof=2147680770, p_off_mclk=<optimized out>, c_aud_ctl=2147683586) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/ep/ep_buffer.xc:408
#1  0x00042124 in XUA_Buffer.task.XUA_Buffer_Ep.0 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/ep/ep_buffer.xc:124
#2  0x0004598c in __start_core ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

***** Disassembly *****
=> 0x41d88 <XUA_Buffer_Ep+216>:	eeu (1r)        res[r9]
   0x41d8a <XUA_Buffer_Ep+218>:	nop (0r)        
   0x41d8c <XUA_Buffer_Ep+220>:	ldap (lu10)     r11, 0x6c
   0x41d90 <XUA_Buffer_Ep+224>:	setv (1r)       res[r6], r11
   0x41d92 <XUA_Buffer_Ep+226>:	nop (0r)        

***** Registers *****
r0             0x0                 0
r1             0x18                24
r2             0x80030a02          -2147284478
r3             0x80030202          -2147286526
r4             0x80030d02          -2147283710
r5             0x80030a02          -2147284478
r6             0x80030c02          -2147283966
r7             0x80030602          -2147285502
r8             0x7f7f8             522232
r9             0x80030202          -2147286526
r10            0x491fc             299516
r11            0x41dc0             269760
cp             0x45f98             0x45f98 <g_subSlot_Out_HS>
dp             0x46300             0x46300
sp             0x7f7a8             0x7f7a8
lr             0x41cf5             0x41cf5 <XUA_Buffer_Ep+69>
pc             0x41d88             0x41d88 <XUA_Buffer_Ep+216>
sr             0x100               256
spc            0x0                 0x0
ssr            0x0                 0
et             0x0                 ET_NONE
ed             0x0                 0
sed            0x0                 0
kep            0x40080             0x40080 <_TrapHandler>
ksp            0x0                 0x0

Thread 2.3 (tile[1] core[2] (hw)):

***** Call Stack *****
#0  0x00045a14 in _write_periph_32_on_chanend ()
#1  0x0004543c in write_periph_32_aux ()
#2  0x00043610 in write_periph_word (tile=3842, addr=<optimized out>, data=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/core/XUD_USBTile_Support.xc:21
#3  0x00042d90 in XUD_HAL_EnableUsb (pwrConfig=1) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/core/XUD_HAL.xc:73
#4  0x00042f32 in XUD_Manager_loop (epChans0=..., epAddr_Ready=..., c_sof=<optimized out>, epTypeTableOut=..., epTypeTableIn=..., pwrConfig=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/core/XUD_Main.xc:248
#5  XUD_Main (c_ep_out=..., c_ep_in=..., c_sof=2147680514, epTypeTableOut=..., pwrConfig=XUD_PWR_SELF, epTypeTableIn=..., speed=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/core/XUD_Main.xc:590
#6  0x00040e90 in __main__main_tile_1_task_XUD_Main_1 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/main.xc:552
#7  0x0004598c in __start_core ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

***** Disassembly *****
=> 0x45a14 <_write_periph_32_on_chanend+56>:	inct (2r)       r1, res[r0] *
   0x45a16 <_write_periph_32_on_chanend+58>:	chkct (rus)     res[r0], 0x1 *
   0x45a18 <_write_periph_32_on_chanend+60>:	eq (2rus)       r0, r1, 0x3
   0x45a1a <_write_periph_32_on_chanend+62>:	bu (u6)         0x1
   0x45a1c <_write_periph_32_on_chanend+64>:	mkmsk (rus)     r0, 0x1

***** Registers *****
r0             0x80030f02          -2147283198
r1             0x1                 1
r2             0x7f684             521860
r3             0x1                 1
r4             0x0                 0
r5             0x1                 1
r6             0x0                 0
r7             0x50                80
r8             0x10400             66560
r9             0x80000             524288
r10            0x406               1030
r11            0x1                 1
cp             0x45f98             0x45f98 <g_subSlot_Out_HS>
dp             0x46300             0x46300
sp             0x7f660             0x7f660
lr             0x4543c             0x4543c <write_periph_32_aux+52>
pc             0x45a14             0x45a14 <_write_periph_32_on_chanend+56>
sr             0x40                64
spc            0x0                 0x0
ssr            0x0                 0
et             0x0                 ET_NONE
ed             0x0                 0
sed            0x0                 0
kep            0x40080             0x40080 <_TrapHandler>
ksp            0x0                 0x0

Thread 2.2 (tile[1] core[1] (hw)):

***** Call Stack *****
#0  0x000410d8 in XUA_Buffer_Decouple (c_mix_out=2147680258) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/decouple/decouple.xc:800
#1  0x00042130 in XUA_Buffer.task.XUA_Buffer_Decouple.1 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/buffer/ep/ep_buffer.xc:159
#2  0x000451f0 in __start_other_cores ()
#3  0x00041cb0 in XUA_Buffer ()
#4  0x00040ee8 in __main__main_tile_1_task_XUA_Buffer_2 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/main.xc:574
#5  0x0004598c in __start_core ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

***** Disassembly *****
=> 0x410d8 <XUA_Buffer_Decouple+448>:	bf (lru6)       r1, 0xea
   0x410dc <XUA_Buffer_Decouple+452>:	clrsr (lu6)     0x2
   0x410e0 <XUA_Buffer_Decouple+456>:	stw (lru6)      r6, dp[0xcd3]
   0x410e4 <XUA_Buffer_Decouple+460>:	ldw (lru6)      r0, dp[0xcd6]
   0x410e8 <XUA_Buffer_Decouple+464>:	stw (lru6)      r0, dp[0x4f7]

***** Registers *****
r0             0x0                 0
r1             0x0                 0
r2             0x48d4c             298316
r3             0x304               772
r4             0x80030002          -2147287038
r5             0x103               259
r6             0x0                 0
r7             0x48b28             297768
r8             0xac44              44100
r9             0x1                 1
r10            0x7f848             522312
r11            0x40168             262504
cp             0x45f98             0x45f98 <g_subSlot_Out_HS>
dp             0x46300             0x46300
sp             0x7f848             0x7f848
lr             0x42131             0x42131 <XUA_Buffer.task.XUA_Buffer_Decouple.1+13>
pc             0x410d8             0x410d8 <XUA_Buffer_Decouple+448>
sr             0x102               258
spc            0x4131c             0x4131c <XUA_Buffer_Decouple+1028>
ssr            0x102               258
et             0x0                 ET_NONE
ed             0x0                 0
sed            0x0                 0
kep            0x40080             0x40080 <_TrapHandler>
ksp            0x463c8             0x463c8

Thread 2.1 (tile[1] core[0] (hw)):

***** Call Stack *****
#0  XUD_GetSetupBuffer (e=298632, buffer=<optimized out>, datalength=0x7fe04) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/user/client/XUD_EpFunctions.c:238
#1  0x00044170 in USB_GetSetupPacket (ep_out=298632, ep_in=<optimized out>, sp=...) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xud/lib_xud/src/user/control/xud_device.xc:38
#2  0x00040648 in XUA_Endpoint0 (c_ep0_out=<optimized out>, c_ep0_in=<optimized out>, c_audioControl=2147683842, c_mix_ctl=0, c_clk_ctl=0, c_EANativeTransport_ctrl=<optimized out>, dfuInterface=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/endpoint0/xua_endpoint0.c:1124
#3  0x00040f14 in __main__main_tile_1_task_XUA_Endpoint0_3 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/main.xc:612
#4  0x000451f0 in __start_other_cores ()
#5  0x00040de8 in __main__main_tile_1 ()
#6  0x00044ea4 in main ()

***** Disassembly *****
=> 0x40a68 <XUD_GetSetupBuffer+32>:	testct (2r)     r1, res[r1] *
   0x40a6a <XUD_GetSetupBuffer+34>:	nop (0r)        
   0x40a6c <XUD_GetSetupBuffer+36>:	bt (lru6)       r1, 0xb
   0x40a70 <XUD_GetSetupBuffer+40>:	nop (0r)        
   0x40a72 <XUD_GetSetupBuffer+42>:	ldw (2rus)      r1, r0[0x2]

***** Registers *****
r0             0x48e88             298632
r1             0x80030402          -2147286014
r2             0x7fe04             523780
r3             0xffffffff          -1
r4             0x7fea4             523940
r5             0x80030e02          -2147283454
r6             0x7fea4             523940
r7             0x0                 0
r8             0x80030c02          -2147283966
r9             0x80030d02          -2147283710
r10            0x80030702          -2147285246
r11            0x0                 0
cp             0x45f98             0x45f98 <g_subSlot_Out_HS>
dp             0x46300             0x46300
sp             0x7fe00             0x7fe00
lr             0x44171             0x44171 <USB_GetSetupPacket+25>
pc             0x40a68             0x40a68 <XUD_GetSetupBuffer+32>
sr             0x140               320
spc            0x0                 0x0
ssr            0x0                 0
et             0x0                 ET_NONE
ed             0x0                 0
sed            0x0                 0
kep            0x40080             0x40080 <_TrapHandler>
ksp            0x0                 0x0

Thread 1.1 (tile[0] core[0] (hw)):

***** Call Stack *****
#0  XUA_AudioHub (clk_audio_mclk=<optimized out>, clk_audio_bclk=774, p_mclk_in=66304, c_aud=<optimized out>, p_lrclk=<optimized out>, p_bclk=<optimized out>, p_i2s_dac=..., p_i2s_adc=...) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/audiohub/xua_audiohub.xc:446
#1  0x000402b0 in _Susb_audio_io_0.task.XUA_AudioHub.0 (frame=<optimized out>) at Documents/sw_usb_audio-_sw_v8_1_0-base/lib_xua/lib_xua/src/core/main.xc:379
#2  __main__main_tile_0 (formal.c_mix_out9=66560) at <synthesized>:626
#3  0x00040ac4 in main ()

***** Disassembly *****
=> 0x405a0 <XUA_AudioHub+652>:	in (2r)         r11, res[r8] *
   0x405a2 <XUA_AudioHub+654>:	nop (0r)        
   0x405a4 <XUA_AudioHub+656>:	bitrev (2r)     r11, r11
   0x405a6 <XUA_AudioHub+658>:	add (2rus)      r4, r1, 0x7
   0x405a8 <XUA_AudioHub+660>:	zext (rus)      r4, 0x3

***** Registers *****
r0             0x1                 1
r1             0x4                 4
r2             0x418f0             268528
r3             0x418c0             268480
r4             0x418d0             268496
r5             0x418b0             268464
r6             0x10500             66816
r7             0x0                 0
r8             0x10700             67328
r9             0x1                 1
r10            0x10600             67072
r11            0x0                 0
cp             0x4163c             0x4163c
dp             0x41750             0x41750
sp             0x7fed8             0x7fed8
lr             0x40635             0x40635 <XUA_AudioHub+801>
pc             0x405a0             0x405a0 <XUA_AudioHub+652>
sr             0x140               320
spc            0x0                 0x0
ssr            0x0                 0
et             0x0                 ET_NONE
ed             0x1                 1
sed            0x0                 0
kep            0x40080             0x40080 <_TrapHandler>
ksp            0x0                 0x0
User avatar
Ross
Verified
XCore Legend
Posts: 1119
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

It appears to be struggling to enable USB.

Things to check:

CLK is indeed 24 mHz
USB_VDD is 1v
USB_VDD33 is 3.3v
Technical Director @ XMOS. Opinions expressed are my own
xmos_user123
Member++
Posts: 19
Joined: Tue Oct 01, 2024 1:43 am

Post by xmos_user123 »

Just double checked those 3 pins

CLK is indeed 24MHZ
USB_VDD = 1.008V
USB_VDD33 = 3.305V
User avatar
Ross
Verified
XCore Legend
Posts: 1119
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Are you building your binary with -fxscope?

Not sure if your customer board has the scope link wired up? I notice it's present in your xn file
Technical Director @ XMOS. Opinions expressed are my own
xmos_user123
Member++
Posts: 19
Joined: Tue Oct 01, 2024 1:43 am

Post by xmos_user123 »

Hi Ross, we ended up finding 2 things:
1. USB_VDD was actually 3.3V instead of 1V
2. After flashing the XMOS, the PLL_AVDD rail drooped to around 0.88V making to so the device could no longer boot from flash or be reflashed

The first issue was mitigated with a routing fix. For the second one, I was wondering if there is any risk with providing 1.08V to the 1V rails? This would ensure that even with a voltage droop due to resistance losses we stay above the 0.95V spec.
User avatar
Ross
Verified
XCore Legend
Posts: 1119
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Okay, it felt like a HW issue so I was starting to clutch at straws! Not so good news for you I guess!

3.3 on USB_VDD maybe causing some damage

1.08 is within tolerance

Another possible solution could be to reduce core clock (i'm not sure of the requirements of your code though)

@Joe is our resident HW guru, he might have further comment.
Technical Director @ XMOS. Opinions expressed are my own