Error flashing: How do I xflash on xCORE Array Microphone XK-USB-MIC-UF216? Topic is solved

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
Post Reply
User avatar
ccrome
Active Member
Posts: 62
Joined: Wed Sep 23, 2015 1:15 am

Error flashing: How do I xflash on xCORE Array Microphone XK-USB-MIC-UF216?

Post by ccrome »

Hi there,
Sorry if this has been answered before, but I can't find the solution here.

I have an XK-USB-MIC-UF216 board, and I've successfully downloaded and compiled sw_usb_audio-[sw]_6.15.2rc1.zip, and replaced sc_xud with sc_xud.zip_2.6.1.zip as per the design advisory.

I run xmake and successfully get

Code: Select all

bin/1i8o2/app_usb_aud_mic_array_1i8o2.xe  
bin/2i8o2/app_usb_aud_mic_array_2i8o2.xe
Then I attempt to flash the device and I get an error:

Code: Select all

Error on tile[0]: failed to connect to flash device. Please verify that SQI type is supported and that the correct SQI ports are defined within your xn file.
My board has red lights on top, green light on mic array, and I get some blinky lights on the programmer before the error message.

I suspect I'm missing a parameter to xflash or something.
  • OS: Ubuntu (I've flashed many xmos boards before with this system)
    Board Revision: JGB0004 2V0
    xTimeComposer Version: 14.3.2

Thanks,
-Caleb

If interested, here's the output of xflash --verbose bin/2i8o2/app_usb_aud_mic_array_2i8o2.xe

Code: Select all

XFlash_Options::ListDevices : xgdb --batch -q --ex listdevices devl-80d43e38
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :42a8c on Node 0
XFlash_Application found _DoException :400a4 on Node 0
XFlash_Application found _start :40000 on Node 0
XFlash_Application found _DoSyscall :47194 on Node 0
XFlash_Application found _DoException :400a4 on Node 0
XFlash_Application : Attempting to Compress Binary Data
libcompressor marker 1=192
libcompressor marker 2=185
libcompressor marker 3=170
libcompressor best marker length 3 2 2 
libcompressor best marker length 3 2 3 
libcompressor best marker length 3 2 4 
libcompressor best marker length 3 2 5 
libcompressor best marker length 3 2 6 
libcompressor best marker length 4 2 6 
libcompressor DoCompression_Compress took : 131ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-944873c4" -x xn "target-xn-v0-ea451da1" -o decompressor-4fde12e9
libcompressor validating decompressor decompressor-4fde12e9
libcompressor launching simulator decompressor-4fde12e9 --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff5a
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 29756 bytes to : 20016 bytes (32.73%)
libcompressor marker 1=169
libcompressor marker 2=227
libcompressor marker 3=107
libcompressor best marker length 3 2 2 
libcompressor best marker length 3 2 3 
libcompressor best marker length 3 2 4 
libcompressor best marker length 4 2 4 
libcompressor DoCompression_Compress took : 824ms
libcompressor compile command=xcc -nostartfiles -Xmapper --bootstyle=forsim -x assembler-with-cpp "decompressor-c36cf963" -x xn "target-xn-v0-ea451da1" -o decompressor-7758d3bd
libcompressor validating decompressor decompressor-7758d3bd
libcompressor launching simulator decompressor-7758d3bd --disable-syscalls --max-cycles 100000000
libcompressor simulator starting @0x40000
libcompressor simulator terminate @0x7ff58
libcompressor decompressor validated
XFlash_Application on Node : 0 compressed from : 44300 bytes to : 30792 bytes (30.49%)
XFlash::DoXFlash
XFlash::DoImageProgramming
XFlash::GetDeviceInfo
XFlash_DeviceInfo::GetDeviceInfo_Hardware
XFlash_DeviceInfo::GetDeviceInfo_Hardware_IssueCompileCommand : xcc -Xmapper --dontenablesodlinks -Xmapper --wnoXN -x xc "spiinfo-c1a45adc" -x xn "target-xn-v0-ea451da1" -o "spiinfo-985471a7" -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO 
XFlash_Utils::BuildRunCommand : xrun --io spiinfo-985471a7 
Error on tile[0]: failed to connect to flash device. Please verify that SQI type is supported and that the correct SQI ports are defined within your xn file.
The .xn file contains this bit of flash info

Code: Select all

  <ExternalDevices>
    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K">
      <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>


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

Post by mon2 »

Hi Caleb. Nice to see you here again. Not an audio developer but can see from your post that the flash attributes are for standard SPI interface. For your CPU and kit, you need to use QSPI mode and your XN file should reflect the mappings for the QSPI (Quad SPI) mode. Believe this is the issue. You can review the mode pins in the schematic for your kit to confirm the boot mode for this design. That is, pretty sure that the XCORE-200 CPU designs, by default, are all made to boot in QSPI mode as it is faster than standard SPI mode. Respectively, the target flash device must offer QSPI support.

http://www.xcore.com/viewtopic.php?t=4603

https://www.xmos.com/support/appnotes/AN00185

this project may help (developed by one of the members of this forum):

https://github.com/eez-open/xmos-eval-board

review the QSPI definition.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Please also review this thread to dump the Flash IDs for your design. Do you see valid IDs being read by xflash or only 0x00 0x00 0x00?

http://www.xcore.com/viewtopic.php?f=26&t=6448&start=10
User avatar
ccrome
Active Member
Posts: 62
Joined: Wed Sep 23, 2015 1:15 am

Post by ccrome »

mon2 wrote:Hi Caleb. Nice to see you here again. Not an audio developer but can see from your post that the flash attributes are for standard SPI interface. For your CPU and kit, you need to use QSPI mode and your XN file should reflect the mappings for the QSPI (Quad SPI) mode. Believe this is the issue. You can review the mode pins in the schematic for your kit to confirm the boot mode for this design. That is, pretty sure that the XCORE-200 CPU designs, by default, are all made to boot in QSPI mode as it is faster than standard SPI mode. Respectively, the target flash device must offer QSPI support.
Thanks so much for the reply!

I think I must be missing something. Isn't there an already configured and ready to build example project for the XK-USB-MIC-UF216 board? Or do I have to manually create everything to get it going?

I'll work on getting the QSPI going -- you're correct about that :-) Thanks,
-Caleb
matthew1
Active Member
Posts: 48
Joined: Mon Oct 19, 2015 2:12 pm

Post by matthew1 »

Hi Caleb,

the error suggests that the flash isn't accessible for whatever reason. From what you've done it should be fine. Could you let me know the date code and serial number of the board you have and I'll look into the manufacturing history of the batch. If you xrun the apps do they work OK?

Thanks,

Matthew.
XMOS
User avatar
ccrome
Active Member
Posts: 62
Joined: Wed Sep 23, 2015 1:15 am

Post by ccrome »

matthew1 wrote:Hi Caleb,

the error suggests that the flash isn't accessible for whatever reason. From what you've done it should be fine. Could you let me know the date code and serial number of the board you have and I'll look into the manufacturing history of the batch. If you xrun the apps do they work OK?

Thanks,

Matthew.
XMOS
Hi Matthew,
I hadn't thought to try xrun. Yep, it runs just find with xrun, but xflash still gives the same error "failed to connect to flash device"

I've attached an image of my board. It's code is 1827-00282. MAC address: 00:22:97:80:11:18

Isn't this an XUF device with built-in flash? The top marking doesn't match either XU216 or XUF216 part marking as shown in the data sheets. What part is that?

I don't see any individual marking on the bottom.

Thanks,
-Caleb
Attachments
IMG_4562.JPG
(2.49 MiB) Not downloaded yet
IMG_4562.JPG
(2.49 MiB) Not downloaded yet
matthew1
Active Member
Posts: 48
Joined: Mon Oct 19, 2015 2:12 pm

Post by matthew1 »

Hi Caleb,

thanks for the reply. Your photo confirmed what I found over the weekend - a few of the latest batch of these boards have been mistakenly assembled with the wrong XMOS IC (without integrated flash). As you can imagine, this is quite embarrassing and I can only apologise. We're looking into why this has happened and are checking our stock to identify affected kits. We also have a new batch being manufactured at the moment so will be able to get known good stock back into the supply chain soon.

In the meantime, I hope you're able to get by using xrun with this board, and as soon as we've sorted out this issue we can arrange to replace it via the disti you bought it from.

Regards,

Matthew.
XMOS
User avatar
ccrome
Active Member
Posts: 62
Joined: Wed Sep 23, 2015 1:15 am

Post by ccrome »

matthew1 wrote:Hi Caleb,

thanks for the reply. Your photo confirmed what I found over the weekend - a few of the latest batch of these boards have been mistakenly assembled with the wrong XMOS IC (without integrated flash). As you can imagine, this is quite embarrassing and I can only apologise. We're looking into why this has happened and are checking our stock to identify affected kits. We also have a new batch being manufactured at the moment so will be able to get known good stock back into the supply chain soon.

In the meantime, I hope you're able to get by using xrun with this board, and as soon as we've sorted out this issue we can arrange to replace it via the disti you bought it from.

Regards,

Matthew.
XMOS
Oopsie! Making stuff is hard :-) Thanks for confirming that I'm not crazy (at least in this instance)

As I mentioned in another thread (http://www.xcore.com/viewtopic.php?p=33855#p33855) , mic0 seems to be broken (just noise is received). Should I return this to DigiKey and get another board (that probably won't have flash but might have 7 working microphones)? Or can you arrange for a fully functional board to be sent?

Thanks,
-Caleb
Post Reply