QSPI Flash programmer/ing

Technical questions regarding the XTC tools and programming with XMOS.
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

QSPI Flash programmer/ing

Post by haiderkb »

Hi
Can anyone recommend the easiest/cost efficient way to program QSPI Flash for XHRA-2HPA please.

I am assuming they cannot be programmed on board/via USB

Excuse my ignorance. I am more of a multiple amp three legged transistor man.
Haider


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

Post by mon2 »

Hi Haider.
I am assuming they cannot be programmed on board/via USB
Correct. You have some options including:

1) pre-program the QSPI flash device out of circuit and then solder onto the PCB. However this can be a nightmare considering the devices are usually SMD so you will have to consider to work with your supplier of the flash memory for this extra value add service. Summary of the procedure is that you need to clone the original QSPI flash memory device using either standard SPI commands and then enable the QSPI bit (xflash can do this for you) or enable the QSPI bit first and then proceed to inject the code into the device using QSPI signals. If this task is performed by your supplier then they should also be able to supply the programmed devices ideally on tape & reel for mass production. Tubes is another option but is slower and frowned upon by most SMT shops.

2) you can solder in a blank QSPI memory device and using a small footprint JTAG like tool, force the XMOS CPU into reset so that the mating interface pins will tri-state (hi-z) and then allow you to program the same flash memory using the external pogo pin tool. Keep the tool cables to a minimum and the clocks to be not too fast but this idea is a sound solution.

We have met with assorted pogo pin manufacturers at past trade shows in Asia but recently leaning towards the following:

http://www.tag-connect.com/what-is-tag-connect

Write back if you wish to contact (small pun) the pogo pin suppliers from Asia.

You will have to layout your PCB to support their head with the desired number of pins but it is a valid option. For example, on your cable, allocate one pin to park the #RESET on the XMOS CPU to be held low (ie. RESET mode). As long as the #RESET line remains low, the XMOS CPU will permit you to apply logic levels onto the same QSPI pins to program / read / write / verify the flash memory device using external hardware.

For the actual programming, you can use a commercial tool or even the XMOS boards to act as the QSPI master. We have done this with success and as noted, you can certainly flash the entire content using standard SPI mode but is quite slow. QSPI mode is best but do watch the cable lengths and the results will vary with the target flash memory device. We have preached a few times here in the forum that our review revealed that Spansion brand (now Cypress) had the most stable results with our logic analyzer using shielded probes for the DUT. Spansion flew through our tests while Winbond had flaky results initially. Winbond then shipped us different die version from Taiwan which offered a pin strength register to match the results we saw with the Spansion devices. Note that not all Winbond devices have such a register so the part numbers and results again will vary.

We have recently designed a low cost tool for SPI / QSPI programming for this task and the bare boards are now in transit to our site from Asia. ETA for the finished product is 2 weeks out if there is an interest.

The premise of our programmer design is to use the XMOS Startkit to program the flash device(s) using SPI or QSPI mode on our add-on PCB (mates with the PCIe slot).

After you program this target flash device, the XRHA-2HPA CPU firmware will permit field upgrades using USB.

Chime back if you have any questions on the process before you commit to your final PCB layout.
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

Hi and thank you for your comprehensive reply
So purely for development purposes and short run prototyping is it worth simply getting the StartKit and your add on programmer board then use provided software for programming/loading firmware?

I can easily create custom firmware using the configurator assuming i have been doing things correctly.

If so, how do I get one?

Haider
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

Also the onboard programming idea seems like a viable one for small runs and prototypes. Is there any guide to how to go about this? Standard pin connections for cables/jtag like connections? Or do I simply have to make one up and match the programming tool output?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi Haider.

1) We are waiting for a few more items to ship out of Shenzhen and then will receive our bare PCBs for this new project. ETA is about 2 weeks for the QSPI Slice board design. Need to test some code after building up the board but is based on some past R&D on the same topic.

2) If you are in a rush, send over a PM with your details and can see about programming up the flash memory and send to you by Canada Post or similar. We are in Canada.

3) Which package are you using for your flash memory ? For now, we can only support the industry standard 8 pin SOIC (150 mil wide) footprint. The pending QSPI Slice board features production grade zero-force sockets to allow for repeat use in volume.

From our last understanding, the IP (firmware) for this XRHA-2HPA is closed source so essentially you will be just cloning the XMOS supplied firmware and applying to your end product as-is.

No official documentation on how to program a blank soldered flash device into your PCB but logical steps to consider are:

a) keep your traces short with respect to the QSPI memory interface

b) allow for some pogo pin interface to assert the related QSPI port pins with a common ground and also another ground to force the #RESET to be parked to be a low. When #RESET is low, the XMOS CPU will be "out of circuit" so you can proceed to assert your QSPI / SPI port pins as you wish.

c) All XMOS CPU devices we have seen to date demand a special power sequencing so do not challenge this requirement. That is, you will want to power sequence as noted in their documentation (typically 3v3 comes up first -> when 3v3 rail is stable -> bring up 1v0 -> when 1v0 rail is stable -> release the #RESET to float to a HIGH). Power up your widget with this sequence -> then hot plug the external programming cable which will then force the parking of #RESET to be a low. Then proceed to program the blank flash memory device.

Do post any relevant schematics / questions before you proceed to a final PCB to assist in catching any potential errors. Will assist where we can.

On this topic and some venting, we have been using a fairly high end logic analyzer ($4k USD from Taiwan) - ZeroPlus analyzer. During a recent setup, found that the tool was not being recognized on the USB 2.0 port on any lab PC. Nasty. Being out of warranty, we took apart the enclosure only to find a GL660USB (USB2.0 to IEEE1284 convertor IC) which we traced to have just 33 ohms in series on the D+/D- lines to the USB2.0 connector. That is, NO ESD protection. Well for under $ 0.05 USD, Socay (Shenzhen) offers some amazing parts which could have removed the grief we faced of downtime. After a week of waiting, we sourced the replacement USB2.0 controller from Shenzhen (bought 5 of these parts + DHL = around $35 USD total) -> an hour to replace the deemed defective interface -> now the tool is once again working.

Zeroplus should never have designed this logic analyzer without ESD protection. Such a tool should have had galavanic USB isolation. The insides of our instrument has an open-frame universal power supply. Nice :(

Moral of the story is that do not skimp out on some mandatory protection to respectively allow for a nice field life of your end widget. Too often we see a disposable approach to end products. There is absolutely no excuse for vendors who for example sell their wares on Amazon where end customers are reporting "my gadget worked for 30-120 days before dying". Wow. Give the design engineer a raise...with our steel boots. Build a product that you will not be ashamed to buy.

The immediate solution is for you to solder in pre-programmed flash memory devices. The next solution is to consider an external tool (like our pending board) and mate with the pogo pins to program your future PCBs. In very high volumes, let Arrow / Digikey / Mouser to program the same code at their site.
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

Hi Thanks once again.
I can wait for availability.

In terms of firmware, we are very early days with experimenting here. However I do understand that using the xConfigurator one can customise using XMOS config files as a base and produce a custom firmware. You seemt o indicate otherwise. We don't want to do too much fancy as we want a 'dumb' machine talking to a 'dumb' DAC. Autonomy in this respect is key as we are adopting modularity and future interfaces are unknown.

Haider
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

Oh I never asked, how much is your board?

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

Post by mon2 »

Hi. While we have not yet reviewed the total BOM costs and associated labor fee to assemble, we are estimating to be under $ 50 USD for the assembled unit. The same design features production grade 8 pin SOIC zero force sockets. If you are considering to be an early adopter, we will work with you on the cost of this new design.

This slice board was designed to be compatible with the STARTKIT as well as the CIRCLE or TRIANGLE slots on other XMOS boards.

The symbols shown in the rendered drawing and top silk screen have been revised to be correct for the pin mappings (STARTKIT, CIRCLE, TRIANGLE).

Would you have the XMOS STARTKIT ?

Image
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

HI Thanks,

For $50 I'll try one for sure. If you can send me pin configs so I can design that onto my boards and see how it goes from there.
Happy to pay+shipping to UK when you are ready.
By all means email me. haider@sonneteer.co.uk

I am your typical analogue engineer who passed his software finals 20 years+ ago and has done only a little non hardware since. So I am teh test to see how dumb proof it is.

Haider
haiderkb
Member
Posts: 9
Joined: Mon Mar 27, 2017 1:48 pm

Post by haiderkb »

Hi again

Which Tag-connect cable were you thinking would be suitable for your board? your IDC header is 8pin (I know for SOP8) but Tag connect has a 10pin and not 8pin cable.

Haider
P.S. How would you like paying?
Post Reply