XU208 programming by an external SPI Topic is solved

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
genap
Experienced Member
Posts: 99
Joined: Sat Aug 31, 2013 11:23 pm

XU208 programming by an external SPI

Post by genap »

Hello,
I am trying to program a memory of the XU208 by an external mcrocontroller (SPI).
I am programming the memory by XMOS JTAG adapter, everything is fine and working properly.
Then I generate a binary file for programming:

Code: Select all

>xflash testprog.xe -o testprog.bin
Then I read part of a memory by extenal SPI and compare it to the binary file.
In my opinion, the content of a JTAG programmed memory and a binary file should be identical.
Nevertheless I see the following (for the first 8 bytes of memory):

Memory programmed by JTAG: 0x3A 0x20 0x00 0x00 0xF9 0x1B 0x00 0x04
----------------------- Binary file: 0x74 0x40 0x00 0x00 0xF3 0x37 0x00 0x09

Where is the problem?
Do I understand something wrong?


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

Post by mon2 »

hi.

1) use any freeware hex editor and load up your .bin file and review the contents. do the first 8 bytes match what was read back over SPI ?

https://mh-nexus.de/en/hxd/

is what we use

2) if not, how reliable is the external SPI tool ? While you are performing this read with an external SPI bus master tool, is the XMOS device parked with #RESET = LOW ? This is important so that the SPI / QSPI lines on the XMOS CPU are tri-stated (hi-z). Only then can an external SPI bus master be deployed to communicate with the same target SPI flash device.

3) Respectively, to validate the above interface, consider to use the external SPI bus master tool to extract out the SPI flash vendor and device IDs. Do these extracted IDs match the SPI flash datasheet?

4) Try parameters including slowing down the SPI clock. How long are the SPI tool wires to this SPI flash device? This does matter. We did a very exhaustive test years ago and found that the pin drive strength of SPI flash devices are not created equal. Back then, we found that SPANSION flash devices were able to drive the longest cables in the lab. Even though we used shielded logic analyzer cables, SPANSION worked every time while Winbond that we had in the lab did not using the same cables. Had a chat with Winbond (USA) and they couriered over from Asia some new samples of the memory device which featured registers to increase the drive strength of the interface lines. If I recall correctly, that device worked much better.
genap
Experienced Member
Posts: 99
Joined: Sat Aug 31, 2013 11:23 pm

Post by genap »

Thank you, mon2!

The advice on reading ID was very useful.
It read wrong until I've downgraded speed to 18MHz from 36.
So speed was the problem.
Now both ID and memory reading is exactly what it's supposed to be.
Post Reply