Almost done. I will release first version with slow programming mode first. The programming speed on 29GL128 is about 190KB+/s. I think a true faster mode should get us about 250KB/s write speed. I might not implement this mode since the slow mode uses 0 ram. Also DCU and DCU3 do not have true fast program mode.
-ERASE firm
Erase starts...
Erase time 00:00:56 (.129)
-SPROGRAM firm
Program Starts...
Program speed 201.62 KB/s
Program time 00:01:22 (.562)
Program pass, if no further programming needed, power off/on the target
-CMPRAM firm
Time 00:01:44 (.834)
Compare data OK
It should be release in a day or two.
YLG80 at the time you get USB JTAG NT the 0.55 should be available for you.
Would you mind post your TRAP code?
I got this trap from the overlay of ST tool chain.
BTW, what is your fastest read and program speed? When I have time I might implement fast mode programming.
It's variant strap compatiblity with my ST20 trap on command sequence
I made over 10 variants of SH2/3/4/H8 TRAP
Speed .... On HS USB device & 20MHz JTAG > 400kb/s without optimization.
I think you are talking about memory write speed which is not counted by me (I could go much higher and 0.55 had not measure it yet).
If your TRAP is true then your program speed should go above 150KB/s for the same flash in that thread.
I believe you are using simple peek command to read memory and that is why you only get 92KB/s read. (I could only get about 80KB/s with simple peek). Your CPU is much faster than mine and you should get much higher read speed than mine (158KB/s).
I am still improving the read speed since I am not happy with only 158KB/s read. My MIPS can go close to 300KB/s read and ARM 600KB/s.
Your command can be optimized. I used high BYTE as the command which can save a lot of time (3/4) .
Your trap seems to be not flexible as you do not have "self-defined-function". The ST Tool chain had examples to load that and that can greatly improve the flexibility of the trap function. The AES memory had only 1K and it cannot fit anything. Sometime you have to load your own program to finish certain task.
Here is the video of 0.55 on Sonicview 8000 HD (Sti7100).
Write speed defend on flash type, example if flash have word write time 17us how write speed total?
That has nothing to do what I am talking about.
You use CFI to ask for the flash type. This flash has special command which can program much faster. In case of similar case on Intel chip you will program 1/10 of the speed that the flash provides.
As I told you, your flash can be programmed at the speed of close to 200KB/s if you use the right program. There are TWO types of AMD flash and TWO types of Intel flash.
The thread you mentioned is he does not even have the CPU detect properly. Read the manually carefully and you will know what I am talking about and increase your programming time at least 5 times!.
By the way, your program should get about 130KB/s if the flash is AMD29L160. That is the right program for AMD29L160. For 29GL large flash this program is too slow.
1. I not need more speed. I check write operation according to datasheet.
2. In my programm for AMD used 3 write algo - slow/fast/buffer
3. I showed my trap header, where you trap?
If you already used buffer and only get 58KB/s then I have nothing to say. Your code does not show you are using buffer mode. When not use buffer mode I got about 60KB/s and when use buffer I got 190KB/s as shown in the video.
I will post the header of my trap which only have 6 function. Different than yours is that I used high byte of the data. Also I used a lot of macros. I used macro for all my trap code (MIPS/ST20/DCU3 etc.)
Since you have a lot more function in the trap you should consider use table instead of whole lot of cmp/eq functions. Table is much more efficient in this case.
I am still working on new trap code to improve the read speed.
I think I will add a full fast speed algo to ST40 as I did for Mips. I will expect to get about 250KB/s programming speed. There is a waste of time with today's algo is to transfer data. The new algo will eliminate this so there is no data transfer while programming.
In the mean time I had a device (ST40) that has only Nand flash and I am thinking add NAND u-boot programming on it too. More and more devices with Linux are going to use NAND only. Since NAND device has "bad sectors", implement full algo to skip the bad sectors might be difficult. So I will try to program the u-boot first.
Lower end devices are more likely to us SPI flash and implement loadable SPI programming will be my next project. I had one user from Japan who is using Realtek CPU with SPI flash. The four SPI algo built in the software does not work for this device and I am going to expand it as external DLL like module to support this flash.
YLG80
You should have received the NT and Windows and Linux code. Hope you have started testing with it.
I have just found a new way of handshaking the SDTRF bit in SDSR. That means I can significantly increase the memory read and write speed. I will re-write the entire trap code and release 0.56 with:
1. faster read speed. The current "getram" algo will become "sgetram" (slow read memory). New "getram" algo will be implemented. Expected speed is above 300KB/s.
2. Full "program" support. The current "erase/sprogram" will still work the way it is but "program" will be closer to the limit of the flash.
Let me know if you have any issues and If needed I can remotely help you via teamviewer. You are the first one officially use it for ST40 target.