SPI flash with IS25LQ016B-JNLE and XHRA-2HPA-TQ64-C

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
dutcher
Member
Posts: 15
Joined: Wed Oct 18, 2017 1:38 pm

SPI flash with IS25LQ016B-JNLE and XHRA-2HPA-TQ64-C

Postby dutcher » Thu Oct 19, 2017 8:06 am

hallo everyone,

I am making a DAC for better sound quality, I have the schematics and parts all figured out, but now I need to program a chip:/

situation:
The audio processor (XHRA-2HPA-TQ64-C) is connected to a external memory (IS25LQ016B-JNLE) (I'm not sure if that is the real function, please correct me if I'm wrong).

they are communicating with each other with serial SPI flash. I'm not sure but I think the XHRA-2HPA-TQ64-C is already programmed in the factory, so I only need to program the IS25LQ016B-JNLE.

I bought a USB SPI flash programmer from aliexpress to do the job. Does someone know some good topics, sites or blogs who can help me out.
Or describe the function what the two chips do and why they need to communicate with each other. Every bit of information is help full to me because I'm completely new with programming.

In the description you can find the electronic schematics:)

Thank you very much.

Image



Image
User avatar
mon2
XCore Expert
Posts: 744
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Thu Oct 19, 2017 2:40 pm

Hi. This topic has been covered many times but openly the details are scattered across this forum. It will be wise to read a few of the posts to get a feel of the task but the summary, once again is:

a) this XMOS audio specific processor contains factory OTP code which demands that the external flash device you have applied is enabled to operate in QSPI mode (this is a single non-volatile bit) inside the device.

b) the firmware you need to inject into the flash device is also posted but can email you via a private email.

c) the OTP code inside the CPU CANNOT program your external flash device so you must do this with external tools and then solder into place. After this initial "booting via your pre-programmed flash" - only then you can do field upgrades to the XMOS supplied IP.

You need to check the USB flash programmer you own for the details on how to ENABLE the QSPI bit for your brand and model of the flash device. This very important else the XMOS CPU will not be able to boot the firmware. Keep this mind. Which model of programmer do you own?

Hope this helps.
Lucas
Junior Member
Posts: 7
Joined: Tue Nov 05, 2013 10:14 pm

Postby Lucas » Thu Oct 19, 2017 3:01 pm

I am going to jump on this thread since I am trying to get up to speed as well...

Am I correct in assuming that the firmware, USB driver, and other information is available for download on the xCORE-AUDIO Hi-Res DAC/HPA Platform page (https://www.xmos.com/support/boards?product=18340)?

Is it possible to program the QSPI flash device in-circuit?

Is the XTAG debug adapter capable of programming?
Lucas
Junior Member
Posts: 7
Joined: Tue Nov 05, 2013 10:14 pm

Postby Lucas » Thu Oct 19, 2017 4:04 pm

After further reading I found a reply on another thread that may answer a couple of my questions...

mon2, this is your reply on thread "How can I program an XHRA 2HPA"

"Hello and welcome. There are many posts on this subject in the forum but the summary is:

1) The XHRA 2HPA is a fixed function device with factory ROM (OTP) code that demands that a pre-programmed flash device be applied onto your PCB.

2) This pre-programmed flash device must have QSPI bit enabled. This is important as the ROM (OTP) code requires this to boot.

3) The external QSPI flash can be programmed by many methods including:

a) external programmer for this memory device (your choice but be sure it supports QSPI settings)
b) in-system programming but only by using external pogo pins while the CPU is in RESET so the QSPI lines from the CPU are hi-z (tri-state)
c) use a modified StartKit to program this memory device - we have done this in the lab by mating a SOIC breakout board -> solder on your QSPI flash memory device -> mate this small PCB to the free port pins on the StartKit -> run the SPI progamming code to program this target device using standard SPI commands. Startkit is about $ 15 USD from Digikey + SOIC breakout board ($2-$3 USD).

The XMOS xflash tool can be used to make the StartKit appear like a flash programmer -> you will need to define the port pins that will be used for this programming exercise. Just keep in mind that XMOS CPU devices are essentially very fast GPIO port pins. By modding the xflash XN file, you can morph the StartKit to be your programmer.


You can find the dump of the flash memory here:

viewtopic.php?f=26&t=6011

Write back if you any questions. Good luck!"
dutcher
Member
Posts: 15
Joined: Wed Oct 18, 2017 1:38 pm

Postby dutcher » Mon Oct 23, 2017 10:05 am

hallo,
Thanks for the reply.
I have bought the USB Programmeur CH341A on Aliexpress.

I have the firmware to program the spi flash. But now I need to enable the 4-bit or quid-IO mode of the chip (IS25LQ016B-JNLE). But I don't know if this SPI flash programmer can operate on configuration registers. I don't know how to enable this mode.

I found the firmware on https://hackaday.io/project/19889/files How can I open these files and program them in the chip?
User avatar
mon2
XCore Expert
Posts: 744
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Mon Oct 23, 2017 11:05 am

@dutcher,

1) which s/w tool are you using with your USB programmer? Did the vendor supply a download URL? Please share.

2) the tool should be able to program the low level registers if the developer wrote the code to support this feature. Not 100% sure as we do not own this tool but the developer details are:

SkyGz@QQ.com
The developer of the software is pretty nice. It was 10$ USD for me for the latest version, v1.31, with free upgrades he says. I had trouble tracking him down, even though his e-mail address is in the program. I didn't realize it was an e-mail address because the font was a little funky. It's SkyGz@QQ.com

Just tell him you're looking to purchase a copy of the CH341A Programmer. He'll ask some questions, send you an e-mail with the new version, have you tell him the Hardware ID, and then send you a registration code. For 10$, you can't really go wrong.

Although his website is in Simplified Chinese, he understands English very well.


reference (see page 3 of this thread):

https://www.badcaps.net/forum/showthrea ... 246&page=3

It is quite possible the s/w you already have is capable to reading/writing to the target SPI flash. If you have this feature then again, very possible you also have the ability to alter the QSPI bit of this target device.

Share the s/w download URL and will see if can spot how to enable this QSPI bit. In the worst case, you can ping the author of the tool and for $10, upgrade to the latest version while asking the same question. Just emailed the author now since the version 1.30 s/w does not appear to offer this QSPI enable support.

If the s/w can R/W the flash, it is trivial to enable the QSPI bit so the author should offer this support. Perhaps this feature is buried somewhere...
User avatar
mon2
XCore Expert
Posts: 744
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Mon Oct 23, 2017 1:54 pm

Just received a reply from the author of the programming s/w:

last version1.34
not support QSPI


So, you will not have luck in enabling the QSPI bit which is required using the CH341A programmer. Not sure why this is not supported as this is a very simple feature to support. Looks like you will have to consider to use a different programmer.

Do you own any XMOS kits like the StartKit? An XMOS kit can be used to act like the flash programmer. Otherwise, you will need a QSPI capable programmer like TL866CS:

https://www.ebay.com/itm/TL866CS-Progra ... SwanRXheqm

somewhere on this forum are the details on this programmer and how to enable the QSPI bit but unable to locate the thread at this time.
dutcher
Member
Posts: 15
Joined: Wed Oct 18, 2017 1:38 pm

Postby dutcher » Mon Oct 23, 2017 2:33 pm

Hi, Thanks for your reply
ohw that's too bad :(. Thought I could save money with a cheap programmer. Is there maybe a cheaper alternative? the vender didn't include software so I downloaded it from the internet
(https://drive.google.com/file/d/0ByEQKt ... tLcnM/view) I found 2 files on the internet see this link: https://hackaday.io/project/19889-untz- ... dphone-amp (the upper two).
I can open the untz-4.6.cfg.bin with the software (I downloaded for the spi programmer) so that is a good thing but how can I enable quad mode for the SPI flash?

I don't know how to use the second file (untz-4.6.cfg) I can't open this one with the software for the SPI programmer. And i can't find the xConfigurator.exe download from the XMOS official site (like the description of the file said) or can I use Community Version 14 to do the job?
best regards,

Image
User avatar
mon2
XCore Expert
Posts: 744
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Tue Oct 24, 2017 4:25 am

How urgent is your project? If not in a rush, review the following, rather rare source code for Windows:

https://github.com/hackpascal/ch341prog

Review on how to compile this source code successfully. If you manage to get this to compile, post back then can work from there. We do not own the same programmer but considering to order one through China but will take a 2-3 weeks to arrive using our freight forwarder in Asia. In short, need access to working source code for Windows or Linux that we can compile and make changes to enable the required QSPI bit.

So far, the above source code is raising some lusb-1.0 errors so no clue on the root cause. Then, using the programmer you have, you can flash your code and then use a small utility to enable the QSPI bit.

Do you have a hot air soldering station to remove SMD ICs?
dutcher
Member
Posts: 15
Joined: Wed Oct 18, 2017 1:38 pm

Postby dutcher » Tue Oct 24, 2017 1:39 pm

Thank you for the reply.
The lusb-1.0 errors is because I didn't connect the programmer to the PC when making that screenshot.
what is an utility?
Do you know how I can use the second file: (https://hackaday.io/project/19889-untz- ... dphone-amp)

Image

I'm good to go when the utility works for enabling the quad mode, and I know how to use the second file:)

kind regards,
Mike

Return to “Development Tools and Programming”