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.
User avatar
rcalhoun
Junior Member
Posts: 4
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

Postby rcalhoun » Tue Sep 22, 2020 3:20 am

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: 1834
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Sep 23, 2020 12:29 pm

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: 4
Joined: Mon Sep 21, 2020 2:29 pm

Postby rcalhoun » Wed Sep 23, 2020 3:18 pm

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
XP-USB-MIC-UF216_bottom.jpg
XP-USB-MIC-UF216_zoom.jpg
I report back when I have new board.

Rob
You do not have the required permissions to view the files attached to this post.
User avatar
mon2
XCore Legend
Posts: 1834
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Sep 23, 2020 3:43 pm

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: 4
Joined: Mon Sep 21, 2020 2:29 pm

Postby rcalhoun » Sat Sep 26, 2020 12:00 am

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
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
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 1 guest