Dienstag, 21. November 2017, 05:36 UTC+1

Sie sind nicht angemeldet.

  • Anmelden
  • Registrieren

Lieber Besucher, herzlich willkommen bei: NAS Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Dienstag, 2. Juni 2009, 10:56

Agestar NSB3AST on STR8132 chip - please help to debrick

Hi.

I have bricked subject-device, so no u-boot available thru serial-console.

I trying to use JTAG-interface on it.


I have built parallel cable, according to this scheme:


and tryed to use FlashTool from HWGuru.

Got some output:

-------------------------

Testing cabletype 1
JTAG-IDCODE: 0x00526fa1 - OK
Bypass-test: 0xaaab5554 - OK

Testing cabletype 2
JTAG-IDCODE: 0xffffffff - not OK
Expected: 0x00526fa1
Bypass-test: 0xffffffff - not OK
Expected: 0xaaab5554

Cable type 1 detected.
Error: Device is NOT in debug-mode.

Some errors detected!

-------------------------


I can not imagine how to switch the device into debug mode.


I have reviewed the documentation, which is located here:


, but did not find exact information about the debug mode.


There are a phrases about the ARM Multi-ICE mode, but I do not know how this is related to my case.

Any help, please.

HWguru

NAS2000-Team

Beiträge: 1 001

Wohnort: Wien

2

Dienstag, 2. Juni 2009, 13:47


I can not imagine how to switch the device into debug mode.


There should be the pin "debug request" which puts the cpu into debug mode - this is like a breakpoint. Normally it is pin 17 on the JTAG port.
On pin 19 "debug acknowledge" you can measure if it has been accepted by the cpu.

I found it the best to make the connection 1/17 before powering the board.

FlashTool is very specific for the SL3316 and SL3516 type of cpu. I don't know if it would work for STR8132.

Regards,
HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!

3

Dienstag, 2. Juni 2009, 14:49

HWGuru, thx fo reply.
I've read about the recommendations of 1 and 17 pin, but the problem is that my board has custom jtag connector.
See pic of the board:
http://00661598475795334117-a-g.googlegr…20(2).jpg?hl=en
All the signals that are found, I have indicated on the picture.
Red line is pull up of CLKOUT/ICESEL pin, that switches chip to ARM Multi-ICE mode.
See chip pinout:
http://groups.google.com/group/dealextre…inout.png?hl=en
There are no any pin with "DBG***"-like name.
There is pin named TESTMODE_EN, that normally pulled down to GND. I tryed to pull it up to +3.3V , with no positive effect.

HWguru

NAS2000-Team

Beiträge: 1 001

Wohnort: Wien

4

Dienstag, 2. Juni 2009, 15:54

In the meantime I looked into the documentation.
I could not find any hint how to use the JTAG interface.

I only found a note that the ARM922 core supports TRACE32, RealView and Multi-ICE JTAG debugging interfaces.

Second problem is that on your board there is a SPI Flash and FlashTool is made for parallel flash ;(
There will be no chance to program your hardware with FlashTool. Sorry :(

Did you have a look at the ARM Development Tools?
I have the feeling that this cpu could be accessed with some standard ARM JTAG debugger.

HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!

5

Mittwoch, 3. Juni 2009, 09:05

There is SPI Flash connector on the board.
Is it possible to program flash directly through this connector?
Also I can remove flash from board (with thermo-fan), program it somewhere and solder it back.
May be it will be more easy, than using Multi-ICE? Because it is hard to use multi-ice for the first time, I need to learn tons of new documentation, or ask the professionals. I have a suspicion that multi-ice is hardware-software complex, and it will not work through a simple parallel cable.

HWguru

NAS2000-Team

Beiträge: 1 001

Wohnort: Wien

6

Mittwoch, 3. Juni 2009, 09:31

Zitat

There is SPI Flash connector on the board.
Is it possible to program flash directly through this connector?
I think so. This is probably the reason why the connector is there.

Zitat

Also I can remove flash from board (with thermo-fan), program it somewhere and solder it back.
But you have to be careful not overheating the board.
You could also remove the solder from the pins with some desoldering wick - wiki article and then carefully lift the pins.

HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!

7

Donnerstag, 4. Juni 2009, 00:35

Hi again.
I fully debricked my device via SPI interface, using this utility: http://rayer.ic.cz/elektro/spipgm.htm
Thanks for help.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Rostislav« (4. Juni 2009, 10:24)


HWguru

NAS2000-Team

Beiträge: 1 001

Wohnort: Wien

8

Donnerstag, 4. Juni 2009, 08:04

Hi,
this is great. :happy:
Could you program it through the SPI connector or did you unsolder the SPI Flash?

If you like we could post the complete procedure in a separate thread. I could also add the bootloader binary to our download database.

Best regards
HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!

9

Donnerstag, 4. Juni 2009, 10:24

I built this programmator, soldered to the appropriate pins on the
flash (you need to unsolder these pins from board for programming),
and programmed it easy.
See log:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
------------------ 
 F:\Temp\str8132\spipgm>SPIPGMW.EXE 
 SPI FlashROM Programmer 1.6 (C) 2008-2009 by Martin Rehak; 
 ra...@seznam.cz 
 Compiled by GCC 3.4.5 (mingw-vista special r3) at 22:49:21, Jan 21 
 2009 
 (Win9x/NT/2K/XP compatability) 
 SYNTAX: spipgm /i|r|d|e|p [filename] [address] [size] [/l=iobase] [/ 
 d=delay] 
         /i - identify SPI FlashROM 
         /r address size - read & display data block (0x prefix = hexa 
 number) 
         /d filename - dump entire FlashROM to file 
         /p filename - program entire FlashROM from file (without 
 erase) 
         /e - erase entire FlashROM 
         /u - unlock write protection bits (may depend on WP# level) 
         /l= LPT port I/O base address (default is 378h - LPT1) 
         /d= additional delay for SPI clock pulse width [usec] (default 
 is 0) 
 LPT to SPI pin assignment (based on BSD AVR programmer): 
 pin  7 = D5 -> CS# 
 pin  8 = D6 -> SCK (CLK) 
 pin  9 = D7 -> MOSI (DIO) 
 pin 10 = ACK -> MISO (DO) 
 pin 18 = GND -> GND

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
 F:\Temp\str8132\spipgm>SPIPGMW.EXE /i 
 SPI FlashROM Programmer 1.6 (C) 2008-2009 by Martin Rehak; 
 ra...@seznam.cz 
 Compiled by GCC 3.4.5 (mingw-vista special r3) at 22:49:21, Jan 21 
 2009 
 (Win9x/NT/2K/XP compatability) 
 SPI connected to LPT port at I/O base address: 378h, SCK pulse width: t 
 +0us 
 FlashROM JEDEC ID, type: 202017h 
 ST Microelectronic M25P64 (8MB) 
 Status = 00h (SRP, RES, TB , BP2, BP1, BP0, WEL, BSY) 
                0    0    0    0    0    0    0    0 

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
 F:\Temp\str8132\spipgm>SPIPGMW.EXE /u 
 SPI FlashROM Programmer 1.6 (C) 2008-2009 by Martin Rehak; 
 ra...@seznam.cz 
 Compiled by GCC 3.4.5 (mingw-vista special r3) at 22:49:21, Jan 21 
 2009 
 (Win9x/NT/2K/XP compatability) 
 SPI connected to LPT port at I/O base address: 378h, SCK pulse width: t 
 +0us 
 FlashROM JEDEC ID, type: 202017h 
 ST Microelectronic M25P64 (8MB) 
 Status = 02h, WE bit is enabled 
 Unlocking... 
 Status = 00h, device is unlocked now. 

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
 F:\Temp\str8132\spipgm>SPIPGMW.EXE /e 
 SPI FlashROM Programmer 1.6 (C) 2008-2009 by Martin Rehak; 
 ra...@seznam.cz 
 Compiled by GCC 3.4.5 (mingw-vista special r3) at 22:49:21, Jan 21 
 2009 
 (Win9x/NT/2K/XP compatability) 
 SPI connected to LPT port at I/O base address: 378h, SCK pulse width: t 
 +0us 
 FlashROM JEDEC ID, type: 202017h 
 ST Microelectronic M25P64 (8MB) 
 Status = 02h, WE bit is enabled 
 Please wait... done. 

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
 F:\Temp\str8132\spipgm>SPIPGMW.EXE /p age-v01r03.bin 
 SPI FlashROM Programmer 1.6 (C) 2008-2009 by Martin Rehak; 
 ra...@seznam.cz 
 Compiled by GCC 3.4.5 (mingw-vista special r3) at 22:49:21, Jan 21 
 2009 
 (Win9x/NT/2K/XP compatability) 
 SPI connected to LPT port at I/O base address: 378h, SCK pulse width: t 
 +0us 
 FlashROM JEDEC ID, type: 202017h 
 ST Microelectronic M25P64 (8MB) 
 Programming page at: 007FFF00h (100%) 
 ------------------ 

But,
something wrong with u-boot now.
It works, but gives crc error on every boot.
See log:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
----------------------- 
 U-Boot 1.1.4 (Nov 27 2007 - 09:29:18) 
 U-Boot code: 00000000 -> 0001AF80  BSS: -> 0001FEF4 
 IRQ Stack: 00e6ff7c 
 FIQ Stack: 00e6ef7c 
 RAM Configuration: 
 Bank #0: 00000000 32 MB 
 Flash Manufacturer: ST 
 Flash:  8 MB 
 *** Warning - bad CRC, using default environment 
 In:    serial 
 Out:   serial 
 Err:   serial 
 PLL clock at 250MHz 
 CPU clock at 250MHz 
 AHB clock at 125MHz 
 APB clock at 62MHz 
 Check Link Status .Up 
 T T T T T T T T T T 
 Retry count exceeded; starting again 
 ----------------------- 


It tryes to get some file on tftp, I see.
I can boot it with reset button pressed and load firmware (without
first 256k) into RAM:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
----------------------- 
 U-Boot 1.1.4 (Nov 27 2007 - 09:29:18) 
 U-Boot code: 00000000 -> 0001AF80  BSS: -> 0001FEF4 
 IRQ Stack: 00e6ff7c 
 FIQ Stack: 00e6ef7c 
 RAM Configuration: 
 Bank #0: 00000000 32 MB 
 Flash Manufacturer: ST 
 Flash:  8 MB 
 *** Warning - bad CRC, using default environment 
 In:    serial 
 Out:   serial 
 Err:   serial 
 PLL clock at 250MHz 
 CPU clock at 250MHz 
 AHB clock at 125MHz 
 APB clock at 62MHz 
 Star Equuleus # tftpboot 0x1020000 age2.bin 
 Check Link Status ...Up 
 TFTP from server 192.168.10.3; our IP address is 192.168.10.2 
 Filename 'age2.bin'. 
 Load address: 0x1020000 
 Loading: 
 ################################################################# 
 ################################################################# 
 ################################################################# 
...
 ################################################################# 
 ################################################################# 
          ############################ 
 done 
 Bytes transferred = 8126464 (7c0000 hex) 
 Star Equuleus # go 0x1020000 
 ## Starting application at 0x01020000 ... 
 Uncompressing 
 Linux............................................................. 
 ...................................................... done, booting 
 the kernel. 
 ----------------------- 

Then, I can log in to web-interface and try to reflash original
firmware through it. Device is going to reboot after flashing, and
goes to the same state (with crc error on boot).
Any ideas, what to do?
I think that I'm erased something wrong in flash. I have old bricked
dump of flash...

10

Donnerstag, 4. Juni 2009, 22:55

The problem is solved.
See solution: http://groups.google.com/group/dealextre…7df625832?hl=en

HWguru

NAS2000-Team

Beiträge: 1 001

Wohnort: Wien

11

Freitag, 5. Juni 2009, 08:24

Hi,
I want to complete the procedure...

For avoiding the CRC error during boot you had to set the start address within u-boot "setenv bootcmd go 0x1000000 ". Am I right?
Can you provide me a link that I can put the firmware image to the download database?

Regards,
HWguru
Leute ohne Laster haben oft wenige Tugenden...
NAS2000 2.3.2.IB.2.RS.1+Lüfterabschaltung+SSH+do_it+zusätzliche commandline tools+changed root password
1. suchen - lesen - Google - lesen - 1. Fragen gehören ins Forum, dann profitieren alle davon!

12

Samstag, 6. Juni 2009, 16:13

Yes, you are right.
Link to original firmware: http://www.agestar.com/english/support/AGE-V01R03.zip
This firmware, roughly, is a dump of flash. It consists of 2 parts:
1. 0x0-0x3FFFF - bootloader
2. 0x40000-eof - linux kernel with programs.
I think, it will work on any STR8132-based device with 8Mb SPI flash and 32Mb RAM (at least, bootloader will).
You need to attach to serial console in recovery-mode (turn on with reset button pressed) after programming flash, and enter these commands:

Quellcode

1
2
3
setenv bootcmd go 0x1000000
 saveenv
 reset

You may want to change default variables, such as MAC-address (it will be like "00AABBCCDD..." after programming flash). You can do it with the same procedure, just enter command in serial console:

Quellcode

1
printenv

and see, how this variable is named (macaddr, for example), then type:

Quellcode

1
2
3
setenv macaddr <your MAC>
saveenv
reset