Home Categories

PM Notification

You are not logged in.

Welcome, Guest
Username Password: Remember me

Search Forum

Keyword

plz help me
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: plz help me

plz help me 3 months ago #1016

any jtag for sti 5202uud and flash ic m58lt128hst8za6

Re: plz help me 1 month ago #1122

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 283
  • Karma: 11
USB JTAG NT will be soon available for that CPU

Re: plz help me 1 month ago #1125

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.
The following user(s) said Thank You: YLG80, stefki

Re: plz help me 1 month ago #1128

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
USBJTAG NT 0.55 was released yesterday. I will compile a few web pages showing how to program some of the ST40 devices.
The following user(s) said Thank You: YLG80

Re: plz help me 4 weeks ago #1136

  • sergiuss
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
usbjtag ST40 use my TRAP from EJTAG_TT, say thank you to me

Re: plz help me 4 weeks ago #1137

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.
Last Edit: 4 weeks ago by usbjtag.

Re: plz help me 3 weeks, 6 days ago #1142

  • sergiuss
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
TRAP header
 
/* ST40 H-UDI bootstrap code by sergiuss, for EJTAG_TT CPLD
*
*
* Used registers:
* r0 - CMD/tmp
* r1 - SDDR
* r2 - RESULT
* r3 - FLS_BASE
* r4 - STATUS1
* r5 - STATUS2
* r6 - COUNTER
* r7 - TMP
* r8 - TMP
* r9 - TMP/cmd_addr
* r10 - COUNT
* r11 - ADDRESS
* r12 - DATA
*
*/

 
/* command definition, 7 bit length */
#define cmd_ReadByte 0x01
#define cmd_ReadWord 0x02
#define cmd_ReadDWord 0x03
#define cmd_WriteByte 0x04
#define cmd_WriteWord 0x05
#define cmd_WriteDWord 0x06
#define cmd_WriteFLS_AMD 0x07
#define cmd_WriteFLS_SST 0x08
#define cmd_WriteFLS_INTEL 0x09
#define cmd_Waite_AMD 0x0A
#define cmd_Waite_SST 0x0B
#define cmd_Waite_INTEL 0x0C
#define cmd_Echo 0x0D

#define RESPOND 0xBAADFACE
#define SDDR_ADDR 0xFFF00008
#define SDSR_ADDR 0xFFF00004
#define ST40_CPG_WTCSR 0xffc0000C
#define CMD_ADDR 0xFC0003FC

 
.global start
 
.text
.org 0
.align 4
start:
/* init address registers offsets */
mov.l sddr_addr_ptr, r1
/* disable WATHDOG */
mov.l wd_addr_ptr, r9
mov.l wd_mask, r8
mov.w r8, @r9
op_ack:
/* load cmd adress and load command */
mov.l cmd_addr_ptr, r9
/* clear CMD */
mov #0x00, r0
/* clear RESULT */
mov r0, r2
/* clear COUNTER */
mov r0, r6
/* clear cmd */
mov.l r2, @r9
 
op_loop:
mov.l @r9, r0
cmp/eq #0x00, r0
bt op_loop
 
/* CMD != 0, check command type */
cmp/eq #0x0D, r0 /* cmd_Echo */
bt cmd_echo
cmp/eq #0x02, r0 /* cmd_ReadWord */
bt cmd_rw
cmp/eq #0x05, r0 /* cmd_WriteWord */
bt cmd_ww
cmp/eq #0x01, r0 /* cmd_ReadByte */
bt cmd_rb
cmp/eq #0x03, r0 /* cmd_ReadDWord */
bt cmd_rdw
cmp/eq #0x04, r0 /* cmd_WriteByte */
bt cmd_wb
cmp/eq #0x06, r0 /* cmd_WriteDWord */
bt cmd_wdw
.......................
 


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.
The following user(s) said Thank You: usbjtag

Re: plz help me 3 weeks, 6 days ago #1143

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
sergiuss
This is from your website
www.ejtag.ru/viewtopic.php?f=9&t=23&...aba80667d0a8d39a9784
The average read speed is 92.9 Kbytes / sec and program speed is 55.4 kb/s.

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).
Last Edit: 3 weeks, 6 days ago by usbjtag.

Re: plz help me 3 weeks, 6 days ago #1144

  • sergiuss
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
I not need "very fast" speed on FS USB. All memory & flash operation have check.
I not use simple check as is
ROM:00000026 loc_26:                                 ; CODE XREF: ROM:0000003Aj
ROM:00000026 mov.w r5, @r3
ROM:00000028 mov.w r6, @r4
ROM:0000002A mov.w r10, @r3
ROM:0000002C mov.w @r12+, r2
ROM:0000002E mov.w r2, @r11
ROM:00000030
ROM:00000030 loc_30: ; CODE XREF: ROM:00000034j
ROM:00000030 mov.w @r11, r0
ROM:00000032 cmp/eq r0, r2
ROM:00000034 bf loc_30
ROM:00000036 add #2, r11
ROM:00000038 cmp/eq r12, r9
ROM:0000003A bf loc_26
ROM:0000003C rts
ROM:0000003E nop
 


Here "simple" poke/peeke, i use fixed speed on a certain level
http://ejtag.ru/Video/usb-f_st40.swf
Last Edit: 3 weeks, 3 days ago by admin. Reason: video link to url
The following user(s) said Thank You: admin

Re: plz help me 3 weeks, 6 days ago #1145

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
sergiuss wrote:
I not need "very fast" speed on FS USB. All memory & flash operation have check.
I not use simple check as is
ROM:00000026 loc_26:                                 ; CODE XREF: ROM:0000003Aj
ROM:00000026 mov.w r5, @r3
ROM:00000028 mov.w r6, @r4
ROM:0000002A mov.w r10, @r3
ROM:0000002C mov.w @r12+, r2
ROM:0000002E mov.w r2, @r11
ROM:00000030
ROM:00000030 loc_30: ; CODE XREF: ROM:00000034j
ROM:00000030 mov.w @r11, r0
ROM:00000032 cmp/eq r0, r2
ROM:00000034 bf loc_30
ROM:00000036 add #2, r11
ROM:00000038 cmp/eq r12, r9
ROM:0000003A bf loc_26
ROM:0000003C rts
ROM:0000003E nop
 


Here "simple" poke/peeke, i use fixed speed on a certain level
[video]http://ejtag.ru/Video/usb-f_st40.swf[/video]


I see you can get to 248KB/s read. I will make mine faster. If I bypass one bottle neck, I think I can get greater than 500KB/s read.

Re: plz help me 3 weeks, 6 days ago #1146

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 283
  • Karma: 11
Hightech discussion !
I'm going to rename the thread to something more appropriate.
The following user(s) said Thank You: slugworth

Re: plz help me 3 weeks, 6 days ago #1147

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
sergiuss wrote:
I not need "very fast" speed on FS USB. All memory & flash operation have check.
I not use simple check as is
ROM:00000026 loc_26:                                 ; CODE XREF: ROM:0000003Aj
ROM:00000026 mov.w r5, @r3
ROM:00000028 mov.w r6, @r4
ROM:0000002A mov.w r10, @r3
ROM:0000002C mov.w @r12+, r2
ROM:0000002E mov.w r2, @r11
ROM:00000030
ROM:00000030 loc_30: ; CODE XREF: ROM:00000034j
ROM:00000030 mov.w @r11, r0
ROM:00000032 cmp/eq r0, r2
ROM:00000034 bf loc_30
ROM:00000036 add #2, r11
ROM:00000038 cmp/eq r12, r9
ROM:0000003A bf loc_26
ROM:0000003C rts
ROM:0000003E nop
 


Here "simple" poke/peeke, i use fixed speed on a certain level
[video]http://ejtag.ru/Video/usb-f_st40.swf[/video]

I know this is your current AMD programming and that is why you only get 58KB/s. If you change it it can go close to 200KB/s

Re: plz help me 3 weeks, 6 days ago #1148

  • sergiuss
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
usbjtag wrote:

I know this is your current AMD programming and that is why you only get 58KB/s. If you change it it can go close to 200KB/s

And if flash broken then result as is usbjtag.com/vbforum/showpost.php?p=47116&postcount=29

Write speed defend on flash type, example if flash have word write time 17us how write speed total?

Re: plz help me 3 weeks, 6 days ago #1149

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
sergiuss wrote:
usbjtag wrote:

I know this is your current AMD programming and that is why you only get 58KB/s. If you change it it can go close to 200KB/s

And if flash broken then result as is usbjtag.com/vbforum/showpost.php?p=47116&postcount=29

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!.

Re: plz help me 3 weeks, 6 days ago #1150

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.

Re: plz help me 3 weeks, 5 days ago #1151

  • sergiuss
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 1
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?

Re: plz help me 3 weeks, 5 days ago #1152

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.

Re: plz help me 3 weeks, 5 days ago #1153

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.

Re: plz help me 3 weeks, 5 days ago #1154

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
Here is the header of original trap code. I will modify it so I can get faster read speed.
 
.macro IfCmd cmd,label
cmp/eq #\cmd,r0
bt \label
.endm
 
.text
.globl _start
.org 0
_start:
DisableWatchDog
forever:
SetRegisters
wait_for_cmd:
GetCommandHiByte
IfCmd CMD_EMPTY,wait_for_cmd
GetParameters
IfCmd CMD_PEEKDWORD,peek_dword
IfCmd CMD_PEEKWORD,peek_word
IfCmd CMD_HANDSHAKE,display_TRAP
IfCmd CMD_PEEKBYTE,peek_byte
IfCmd CMD_POKEBYTE,poke_byte
IfCmd CMD_POKEWORD,poke_word
IfCmd CMD_POKEDWORD,poke_dword
IfCmd CMD_CUSTOMFUNC,execcommand
 
 
Last Edit: 3 weeks, 4 days ago by usbjtag.

Re: plz help me 3 weeks, 4 days ago #1155

  • usbjtag
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
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.
The following user(s) said Thank You: admin
  • Page:
  • 1
  • 2
Moderators: YLG80
Time to create page: 3.44 seconds