XK-USB-MIC-UF216 microphone array dev board gives "Cannot load image, XCore 0 is not enabled" error

New to XMOS and XCore? Get started here.
Post Reply
User avatar
rcalhoun
Junior Member
Posts: 5
Joined: Mon Sep 21, 2020 2:29 pm

XK-USB-MIC-UF216 microphone array dev board gives "Cannot load image, XCore 0 is not enabled" error

Post by rcalhoun »

I'm trying to get started with the XMOS "dev kit for microphone array" (XK-USB-MIC-UF216). The board shipped with a Design Advisory card referencing http://www.xmos.com/doc/XM-012350-DA , (which seems to be the same as this xmos.ai link.)

The design advisory says:
the USB audio application app_usb_aud_mic_array distributed in the current release of the USB Audio 2.0 Reference Software package sw_usb_audio (6.15.2rc1) will not work with this latest design because it performs a check that VBUS is present before enabling the USB connection.
I've been able to compile an .xe binary of app_usb_aud_mic_array with the patched version of sc_xud, but all attempts to run the binary generate a "xrun: Cannot load image, XCore 0 is not enabled" error.

Most of the forum posts about "XCore 0 is not enabled" discuss hardware issues; this board is an XMOS-designed dev board so I assume the design is ok; from non-exhaustive visual inspection it looks free of gross defects.

Steps to reproduce
* ordered XK-USB-MIC-UF216 from digi-key
* PCB is marked 2V0 on the back side. Per the Design Advisory, rev 2 boards require updated FW.
* download XTimeComposer latest (14.4.1)
* plugged in the provided XTAG3 board
* attached provided "short" USB cable to the XTAG3 USB port
* attached provided "long" USB cable to the dev board
* Plugged both USB ports into a USB 3.0 Mac OS X 10.13 host
* On power up, all LEDS illuminate and remain lit.
* XTAG3 is enumerated in the USB device tree.
* XMOS audio device is not enumerated in the device tree.

Following the design advisory directions: (using command line on OS X; xTimeComposer on Mac does not populate libraries or examples.)

* Open terminal
* run SetEnv.command from ~/xmos. (Same result if starting in install dir)
* Download https://www.xmos.ai/download/sw_usb_aud ... .15.2).zip
* unzip to ~/xmos/sw_usb_audio
* Download https://www.xmos.ai/download/sc_xud.zip(2.6.1).zip
* unzip to ~/xmos/
* replace directories ~/xmos/sw_usb_audio/sc_usb and ~/xmos/sw_usb_audio/sc_xud with the respective directories from sc_xud.zip(2.6.1).zip
* (also tried replacing only sc_xud, same result)
* build:

Code: Select all

$ cd ~/xmos/sw_usb_audio/sw_usb_audio/app_usb_aud_mic_array
$ xmake
(...)
Creating app_usb_aud_mic_array_2i8o2.xe
Constraint check for tile[0]:
  Cores available:            8,   used:          4 .  OKAY
  Timers available:          10,   used:          4 .  OKAY
  Chanends available:        32,   used:         10 .  OKAY
  Memory available:       262144,   used:      45296 .  OKAY
    (Stack: 2628, Code: 17604, Data: 25064)
Constraints checks PASSED.
Constraint check for tile[1]:
  Cores available:            8,   used:          6 .  OKAY
  Timers available:          10,   used:          8 .  OKAY
  Chanends available:        32,   used:         19 .  OKAY
  Memory available:       262144,   used:      57408 .  OKAY
    (Stack: 4076, Code: 38880, Data: 14452)
Constraints checks PASSED.
Build Complete
Built all configurations
* So I can build ok. But then I get into trouble:

Code: Select all

$ cd bin/2i8o2
$ xrun -l

Available XMOS Devices
----------------------

  ID	Name			Adapter ID	Devices
  --	----			----------	-------
  0 	XMOS XTAG-3         	ibH9k0JD	None


$ xrun --id 0 app_usb_aud_mic_array_2i8o2.xe
xrun: Cannot load image, XCore 0 is not enabled

$ xrun --id ibH9k0JD app_usb_aud_mic_array_2i8o2.xe
xrun: Cannot load image, XCore 0 is not enabled

$ xrun --list-board-info 

XMOS Target Board Info
----------------------

  ID	Name			Serial		Type
  --	----			------		----
  0	Unknown             	0x00000000	0x00000000
Also tried:
  • reinstalling Xtimecomposer now that the DNS issue is fixed
  • running setenv command from installation directory instead of ~/xmos.
  • power up board usb first then xtag3, and vice-versa
  • swap short and long usb cables
  • reboot host
  • Switch to Windows

============ Windows ==========

* Install XtimeComposer on Windows 10 machine with a USB 2.0 card.
* Install the XMOS-only version of the Thesycon driver.
* Reboot and start XTimeComposer
* Startup on the Windows version of XTimeComposer is a much better experience than on the Mac. (None of the documentation, library, or example folders populate on the Mac; it just says "Connection to https://www.xmos.com failed".)
* Try working through the app_getting_started "hello, world" example.
* XK-USB-MIC-UF216 does not appear in the "Target" list. It uses the XUF216-512-TQ128 (I assume -C20?) part.
* I tried these (none seems correct, but what to use?)
** xCore-200 Explorer
** sliceKIT Core Board (XU216)
** XUF216-512-TQ128-C20
** XUF216-512-TQ128-I20
* All of these failed with the same error as on the Mac, "xrun: cannot load image, XCore 0 is not enabled".
* I did not try building sw_usb_audio on Windows because it seems I can't program even hello world.


I found these support posts; they confirm I need new firmware, but haven't addressed my issue.
Mic Array: USB Audio Device - No Devices connected ("The board requires 6.19+ firmware version.", but no link to such version)
XP-USB-MIC-UF216 not detected it as USB audio device ("Firmware version 6.19+ must be used", again no link)
Is there a public repository for sw_usb_audio/sc_usb_audio? (link to three github sites; helpful but none has sw_usb_audio)
How to start on XCore microphone array (XP-USB-MIC-UF216) ("I am able to build a correct firmware and load it to the board." So it works for some people)
Getting started with the xCORE Microphone Array (notes publication of design advisory for XK-USB-MIC-UF216)
Change microphone gain XP-USB-MIC-UF216 (low gain, maybe due to sensitivity change from Akustica -> Infineon mic change)

Any suggestions on what to try next? It hasn't been a great out-of-box experience so far.

Thanks,

Rob

p.s. Might I recommend posting an updated binary for this board + flashing instructions on the xmos website? A github repo for the dev kits would also be appreciated. Downloading various zip archives and hand-merging directories is not really optimal...


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. It appears that you have a DOA kit. The symptoms are very likely linked to a bad soldering of the XMOS CPU. There is a list of factors that can raise this issue but each is hardware based. This should not be your problem on a fresh kit purchase.

Best if you raise the issue with the vendor who sold this kit and ask for a RMA.

You could also raise a technical support ticket with XMOS but return to vendor may be faster.

The xtag3 (JTAG) tool is not able to communicate with the CPU.
User avatar
rcalhoun
Junior Member
Posts: 5
Joined: Mon Sep 21, 2020 2:29 pm

Post by rcalhoun »

Thanks. I will RMA the board.

I'm attaching images of it in case it helps track down a QA issue. This board's serial number (1827-00118) is fairly close to that of defective board (1827-00282) discussed in viewtopic.php?t=6827. (Although I at least have the correct part on the board :-).
XP-USB-MIC-UF216_top.jpg
(2.12 MiB) Not downloaded yet
XP-USB-MIC-UF216_top.jpg
(2.12 MiB) Not downloaded yet
XP-USB-MIC-UF216_bottom.jpg
(1.92 MiB) Not downloaded yet
XP-USB-MIC-UF216_bottom.jpg
(1.92 MiB) Not downloaded yet
XP-USB-MIC-UF216_zoom.jpg
(1.43 MiB) Not downloaded yet
XP-USB-MIC-UF216_zoom.jpg
(1.43 MiB) Not downloaded yet
I report back when I have new board.

Rob
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Yes, the CPU part soldered on the PCB looks correct and is the XUF (internal flash) CPU.

But the xtag3 output should be able to communicate with the CPU on a working PCBA.

Code: Select all

xrun -l
Also, the kit should enumerate as a USB function on your PC / MAC for a quick out-of-the-box use. Personally do not own this kit but that is the expectation of any evaluation kit. Pay and start using for your development :)

The symptoms are pointing to the bottom side ground pad not being soldered properly which was a common issue with other past reviews from developers. Perhaps your external clock source is not working but not likely. Even if the CPU was not factory programmed with the default firmware, the xtag3 should have been able to enumerate this CPU. That is jtag-101.
User avatar
rcalhoun
Junior Member
Posts: 5
Joined: Mon Sep 21, 2020 2:29 pm

Post by rcalhoun »

I received a new board from Digi-Key (S/N 1827-00082). It works! Thank you very much, Mon2!

I was able to run the app_usb_aud_mic_array application, after which the device enumerates in the OS X USB Device Tree and works as a UAC 2.0 audio input device. After all the trouble I had with this last week, recording 8 channels (7 + 1 blank) at 384 kHz using Audacity is anticlimatic:
audacity.png
(30.39 KiB) Not downloaded yet
audacity.png
(30.39 KiB) Not downloaded yet
There were a few other users who posted working binaries, but none of those links currently work. For the benefit of future XK-USB-MIC-UF216 owners who end up on this forum, here are binaries for the rev 2V0 board plus quickstart instructions.
  • Download the zip file below and unzip it
  • Open Terminal (OS X) and run the commands below

Code: Select all

# set environment

/Applications/XMOS_xTIMEcomposer_Community_14.4.1/SetEnv.command 

# change to directory containing UAC 2.0 binary, e.g.

cd ~/Downloads/bin/2i8o2/

# make sure the JTAG can see the board

xrun -l

#Available XMOS Devices
#----------------------
# ID	Name			Adapter ID	Devices
#  --	----			----------	-------
# 0 	XMOS XTAG-3         	01HNm7cc	O[0]

# load firmware into ram and start it. At this point, the board should enumerate in the USB device tree and work as a 1 to 8 microphone audio device. 
# Test that it does so before going on to the next step.

xrun --id 0 app_usb_aud_mic_array_2i8o2.xe 

# If you power cycle the device, it will lose the code and stop working. Try that.
# Now write the code to flash so it will load on boot
# There are a bunch of optional arguments to xflash that make it less stupid than this, but the defaults seem to work.

xflash --id 0 app_usb_aud_mic_array_2i8o2.xe

# I got a bunch of warnings but the flash process seems ok. It takes a while.
# Warning: F03098 Factory image and boot loader cannot be write-protected on flash device on node 0
# xflash: Warning: F03148 --quad-spi-clock not given, using default 15.62MHz
# xflash: Warning: F03149 QE_REGISTER and/or QE_BIT locations not found in XN file for this flash device. Using default flash_qe_location_status_reg_0 and flash_qe_bit_6.
# Warning: F03150 The use of libquadflash will be deprecated from XFLASH in xTIMEcomposer 15.0.0.
# Please add the PageSize, SectorSize and NumPages attributes to your External Device definitions in your target XN file to enable the use of lib_flash.
# Site 0 has finished successfully. 

# power cycle the board and verify it still works as a UAC 2.0 device.
There is no reason to use the USB Audio Core 1.0 binary as even Windows comes with a built-in UAC 2 driver as of Windows 10 release 1703.

-Rob
app_usb_aud_mic_array_bin.zip
(595.7 KiB) Downloaded 249 times
app_usb_aud_mic_array_bin.zip
(595.7 KiB) Downloaded 249 times
timothyq
New User
Posts: 2
Joined: Sun Nov 15, 2020 5:37 am

Post by timothyq »

Hi mon2,
I have a silmilar issues. In order to avoid too much topics I'd like to post it here because of the resemblance of problems.
I have got the same board with a closed board id(1827-00018 vs rcalhoun's 1827-00118) that can't flash the image into.
I follow the same steps as rcalhoun:

* PCB is marked 2V0 on the back side. Per the Design Advisory, rev 2 boards require updated FW.
* download XTimeComposer latest (14.4.1)
* plugged in the provided XTAG3 board
* attached provided "short" USB cable to the XTAG3 USB port
* attached provided "long" USB cable to the dev board
* Plugged both USB ports into a USB 3.0 Mac OS X 10.13 host (Mine is window 10 PC)
* On power up, all LEDS illuminate and remain lit.
* XTAG3 is enumerated in the USB device tree.
* XMOS audio device is not enumerated in the device tree.

* Download https://www.xmos.ai/download/sw_usb_aud ... .15.2).zip
* Download https://www.xmos.ai/download/sc_xud.zip(2.6.1).zip
* replace directories ~/xmos/sw_usb_audio/sc_usb and ~/xmos/sw_usb_audio/sc_xud with the respective directories from sc_xud.zip(2.6.1).zip

And build in Xtimecomposer which succeeded, but got "Cannot load image, XCore 0 is not enabled" error when flashing.

The difference in my case is that I can see the Xmos core through Jtag, but unable to get board info:
xrun -l
Available XMOS Devices
----------------------
ID Name Adapter ID Devices
-- ---- ---------- -------
0 XMOS XTAG-3 B1hBiOV9 O[0]

xrun --list-board-info

XMOS Target Board Info
----------------------

ID Name Serial Type
-- ---- ------ ----
0 Unknown 0x00000000 0x00000000

I also tried the app_usb_aud_mic_array_2i8o2.xe built by rcalhoun but result was the same.
I didn't set anything, just import the diretory. The mic_array_ref.xn is created in 2016/4/6 and I assumed that the makefile will automatedly comply with it, which is correct.
What should I check? The frequence or setting in .xn?
Or should I fetch some instruments to check some hardware propoties such rest_n, clock in or voltage?
Or my case can be just comform into a hardware problem?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

@timothyq - hi. Sorry to hear of this status.

Based on my understanding, sounds like a factory DOA kit.

reference:
viewtopic.php?t=7380

Gathering that this is a relatively new sourced kit?

If you have the tools, you could try to repair the CPU with a hot-air tool but openly, why bother? These are not low cost tools. The hints seem to point to a poor PCB assembly. It really should be returned back to the vendor for a fresh swap of a kit that is not impacted by this issue.

Did the contracted factory not test these units before packaging / shipping? Poor QC continues :(
ID Name Adapter ID Devices
-- ---- ---------- -------
0 XMOS XTAG-3 B1hBiOV9
Your JTAG tool is being found.


O[0]

The XMOS target CPU is being found.

One of the above issues noted in the link is halting your progress.

You can check if your external 24 Mhz clock source is operating on the kit. From memory, believe this is the common value used for the USB PHY. Suspecting that the root cause will be a poor reflow of the XMOS CPU. This was often the issue with custom PCBAs that would raise the same error message (the metal belly underneath the package was not soldered properly). As long as you are not blamed for attempting to rework (ie. voiding your warranty and cannot return for a board swap) the kit, you could try to repair with a hot air tool.

Curious to hear from your feedback.
timothyq
New User
Posts: 2
Joined: Sun Nov 15, 2020 5:37 am

Post by timothyq »

@mon2. Thanks for your reply.
I'm fascinated by Xmos devices for their powerful functions and performance, but I'm not a pro hardware engineer, so I may replace it this time. My plan is just implement some basic algorithms first and then gradually go into more hardware. Thanks, again.
Post Reply