xCore-200 MC dev board - failed to connect to SQI flash device with sample code

If you have a simple question and just want an answer.
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

Hi mon2,

Appreciate the good info! I'm looking at the board now, but here's a few answers to your questions straight off.

1) out of the box, does XMOS ship with onboard firmware on this kit? Perhaps some LEDs blink on the LED array? Please confirm this firmware detail as it is important.
== Nothing whatsoever, the board is dead as a Dodo with the exception of a a few PSU LEDs. No USB enumeration, nothing.


2) If the kit does feature some factory based firmware then most likely this firmware is loading from the external QSPI flash device. This relationship should validate that the flash device is operational and properly connected to the XMOS CPU on this kit. If there is no firmware supplied inside this external flash, continue to read on...
== Agree, but dead code-wise.

3) The read ID SPI flash command should have returned the ID of the external flash device. The 9fh ID command is common to many flash devices and is listed inside the ISSI datasheet. As long as the XN file is properly mapping the port pains to the proper external flash device, the xflash tool should have worked. From an earlier review of this thread, believe your XN file looked ok.

== This is interesting and I think perhaps I'm missing or assuming something here. Having a look at the board then the schematics the SPI flash is in no way connected to the xTAG3 header ( J9 ) directly as some programmers are to the device they're programming. The SPI flash is hanging off the xmos so am I correct to assume it plays a role with some sort of xTAG3 to SPI chuck of firmware? If so maybe that's the issue?


4) Can you confirm again on the part markings on the flash device onboard your kit? The XMOS schematic notes an ISSI IS25LQ080B @ U24. Perhaps the schematic is out of sync but worthwhile to review.
== Definitely a IS25LQ016BNLE ( U24 ) Yes, looks like the schematics are slightly out.. There's a white sticker on my board with 1904-00095 if it means anything.

These questions aside, I've seen a lot of mention about *.bin files which are required to be loaded in to the flash; looking through the directories of xTimeComposer I don't see a single bin. Although not immediately relevant to my SPI communication issue can the xTimeComposer produce *.bins in some sort of "release" build once I'm past this problem?

Thanks again, I now going to go through some of your other suggestion..


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

Post by mon2 »

Correct. The XTAG3 tool MUST be connected to this kit else the target flash cannot be programmed. The XTAG3 = JTAG and is a fancy name for a bit banging state machine that will index the external flash and then perform the R/W/E functions on the external memory device.

Can you confirm the XTAG3 tool is connected to the kit for the xflash procedures?
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

Hi mon2,

The command xflash --target-file YOURFLASH.xn --read-all -o memdump.bin produced a file with very large blocks of 0x00 and 0xFF; nothing else but these two values.

Some other logs.. Clearly some broken coms somewhere..


ed:Community_14.3.3$xflash -l -v
XFlash_Options::ListDevices : xgdb --batch -q --ex listdevices

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

ID Name Adapter ID Devices
-- ---- ---------- -------
0 XMOS XTAG-3 NN2WUEuW O[0]

ed:Community_14.3.3$xflash --target-file /home/ed/xmos/projects/app_usb_aud_xk_216_mc/src/core/xk-audio-216-mc.xn --erase-all -v
XFlash_Options::ListDevices : xgdb --batch -q --ex listdevices devl-56d4bdef
XFlash::DoXFlash
XFlash::DoReadWriteErase
XFlash_Programmer_Erase_NoChan::DoErase
XFlash_Programmer_Erase_NoChan::IssueCompileCommand
xcc -w -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --bootstyle=forsim -x xn "/home/ed/xmos/projects/app_usb_aud_xk_216_mc/src/core/xk-audio-216-mc.xn" -O2 -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fe-94d66bda" -o "fe-3a1beaec"
XFlash_Utils::BuildRunCommand : xrun --io fe-3a1beaec
Error: Failed to recognise flash device at node "0".


ed:Community_14.3.3$xflash --id 0 --target-file /home/ed/xmos/projects/app_usb_aud_xk_216_mc/src/core/xk-audio-216-mc.xn --erase-all -v
XFlash::DoXFlash
XFlash::DoReadWriteErase
XFlash_Programmer_Erase_NoChan::DoErase
XFlash_Programmer_Erase_NoChan::IssueCompileCommand
xcc -w -Xmapper --dontenablesodlinks -Xmapper --nochaninit -Xmapper --noinitialtidy -Xmapper --bootstyle=forsim -x xn "/home/ed/xmos/projects/app_usb_aud_xk_216_mc/src/core/xk-audio-216-mc.xn" -O2 -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fe-120214b8" -o "fe-039d7b32"
XFlash_Utils::BuildRunCommand : xrun --io --id 0 fe-039d7b32
Error: Failed to recognise flash device at node "0".
ed:Community_14.3.3$



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

Post by mon2 »

Can you review the part markings on the flash IC itself? It is important for the XN file to reference the exact p/n that is present on the PCB.
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

Correct. The XTAG3 tool MUST be connected to this kit else the target flash cannot be programmed. The XTAG3 = JTAG and is a fancy name for a bit banging state machine that will index the external flash and then perform the R/W/E functions on the external memory device.
== OK, so what your saying is no firmware in then xmos between the xmos and qspi and jtag; but the jtag clocks right through the xmos and out through the spi ports like in the normal jtag daisy chain fashion?


Can you confirm the XTAG3 tool is connected to the kit for the xflash procedures? === Yes, connected, only thing I sue for xmos.
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

IS25LQ016BNLE - under the microscope.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Ok. AND your XN file references the same flash device p/n? If yes then intentionally point to a different folder so that the xflash tool fails. Need to confirm that the xn file you have applied is actually being read. Ran out of time today but wanted to perform some similar testing with our kits in the lab. The mapping from a while ago shows that XCORE-200 Explorer kit is the same as the audio kit. A bit of a concern about the toolchain on Linux so if you have the luxury, do consider to test on Windows.
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

Hi mon2,

With a pin toggler tester I can confirm all the qspi pins defined in the attached .xn physically toggle each pin. I have tested the pins in the follow structure which map to my .xn
fl_QSPIPorts p_qflash =
{
XS1_PORT_1B,
XS1_PORT_1C,
XS1_PORT_4B,
};

I'll try on a win10 box tomorrow.

Cheers.
Attachments
xk-audio-216-mc.xn
(4.57 KiB) Downloaded 173 times
xk-audio-216-mc.xn
(4.57 KiB) Downloaded 173 times
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

What does the GUI tool report when you attempt to flash the code?

xmos_flash_gui.png
(89.02 KiB) Not downloaded yet
xmos_flash_gui.png
(89.02 KiB) Not downloaded yet
Zed1970
Active Member
Posts: 55
Joined: Tue Oct 15, 2019 10:36 am

Post by Zed1970 »

Hi mon2,

LINUX
I've replaced the board's 25LQ016 ( that came on the brand new xCore-200 MC board ) and put a 25LQ080 on it as the circuit states. On linux I did read an id albeit weird, Response to SPI ID command on tile[0]: 0x9d, 0x60, 0x14. 0x94 is correct but the other two aren't. Other commands fail as before.

WINDOWS 10
On windows 10 as you suggested, again with untouched environments it debugs OK but no qspi flashing. I've changed the xn to suit the 25LQ080B now on the board and also tried the nx from another customer you supplied me last week. I get an error on the Windows PC when I try to do a simple --spi-read-id 0x9f => Error F03005 ( VB handler ) Header tag incorrect.

I've looked all this forum for this error code but found nothing. What does this error mean? Bear in mind this is untouched code off xcore site with the nx you gave me.

Thanks.
Post Reply