Вы находитесь на странице: 1из 46

Ingenic JDI

User Manual
Revision: 1.3
Date: Jan. 2007

JDI
Copyright Ingenic Semiconductor Co. Ltd 2006. All rights reserved.

Release history
Date
Jan. 2007

Revision
1.3

Change
- Added new commands: nquery, nreadraw, nreadoob,
memtest, gpios, gpioc.
- Modified some commands usage: nread, nprog.
- Added comments to scale PLL etc.

Aug. 2006

1.2

- Added new commands (showcfg/reset).


- Removed command (config).
- Modified command (debug).

July 2006

1.1

- Added description for new commands.

Apr. 2006

1.0

- First release.

Disclaimer
This documentation is provided for use with Ingenic products. No license to Ingenic property rights is
granted. Ingenic assumes no liability, provides no warranty either expressed or implied relating to
the usage, or intellectual property right infringement except as provided for by Ingenic Terms and
Conditions of Sale.
Ingenic products are not designed for and should not be used in any medical or life sustaining or
supporting equipment.
All information in this document should be treated as preliminary. Ingenic may make changes to this
document without notice. Anyone relying on this documentation should contact Ingenic for the
current documentation and errata.

1
E 801C
Tel: 86-10-58851003
Fax: 86-10-58851005
Http: //www.ingenic.cn

1 ................................................................................................... 1
2 ............................................................................................ 3
2.1

.......................................................................................................................... 3

2.1.1

................................................................................................................... 3

2.1.2

TFTP ................................................................................................................. 3

2.1.3

................................................................................................................... 4

2.1.4

[INIT] .......................................................................................................... 5

2.1.5

JDI.......................................................................................................... 6

2.1.6

JDI.......................................................................................................... 6

2.1.7

JDI ............................................................................................................................ 7

2.2

EEPROM...................................................................................................................... 7

2.2.1

................................................................................................................... 7

2.2.2

EEPROM.................................................................................................................. 7

2.3

NOR FLASH................................................................................................................. 8

2.3.1

................................................................................................................... 8

2.3.2

NOR FLASH............................................................................................................. 9

2.4

2.3.2.1

NOR FLASH .......................................................................................... 9

2.3.2.2

NOR FLASH ..................................................................................................... 9

2.3.2.3

NOR FLASH ................................................................................................... 10

NAND FLASH ............................................................................................................ 10

2.4.1

................................................................................................................. 10

2.4.2

NAND FLASH .........................................................................................................11

2.5

2.4.2.1

NAND FLASH .......................................................................................11

2.4.2.2

NAND FLASH..................................................................................................11

2.4.2.3

NAND FLASH................................................................................................. 12

GDB .................................................................................................................... 12

3 JDI .......................................................................... 15
3.1

JDI..................................................................................................... 15

3.1.1

JDI........................................................................... 15

3.1.2

JDI.................................................................... 15

3.2

..................................................................................................................... 16

3.2.1

help ................................................................................................................. 16

3.2.2

ipconfig............................................................................................................ 16

3.2.3

fconfig ............................................................................................................. 17

3.2.4

netmask .......................................................................................................... 17

3.2.5

gateway........................................................................................................... 17

3.2.6

bcast ............................................................................................................... 17

3.2.7

showcfg.................................................................................................... 18
i

JDI , Revision 1.2


Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

3.3

debug ......................................................................................................................18

3.4

FLASHEEPROM..............................................................................................18

3.4.1

EEPROMeread ........................................................................................19

3.4.2

EEPROMeprogv............................................................................19

3.4.3

EEPROMeprog .................................................................................20

3.4.4

NOR FLASHquery...........................................................................................20

3.4.5

NOR FLASHsectorquerya........................................................................21

3.4.6

NOR FLASHreadf ........................................................................................21

3.4.7

NOR FLASHerase .......................................................................................22

3.4.8

NOR FLASHprog .........................................................................................22

3.4.9

NAND FLASHnquery ...................................................................................23

3.4.10

NAND FLASHnread.....................................................................................23

3.4.11

NAND FLASHnreadraw ...............................................................................24

3.4.12

NAND FLASHnreadoob...............................................................................24

3.4.13

NAND FLASHnerase ...................................................................................25

3.4.14

NAND FLASHnprog.....................................................................................25

3.5

..........................................................................................................26

3.5.1

readids.............................................................................................................26

3.5.2

cputest.............................................................................................................26

3.5.3

memtest...........................................................................................................27

3.5.4

gpiosgpioc....................................................................................................27

3.5.5

hwtest1 hwtest2 ...........................................................................................27

3.5.6

reset.................................................................................................................27

3.5.7

Firmwareversion.......................................................................................27

3.5.8

FirmWareupgrade............................................................................................28

3.5.9

run ........................................................................................................28

3.5.10

telnetexit ...........................................................................................29

4 .........................................................................31
4.1

[INIT] .......................................................................................................................32

4.1.1

CP0 WCP0 ...........................................................................................32

4.1.2

........................................................................................32

4.2

[INIT] .......................................................................................................................33

4.3

[FLASH]...................................................................................................................33

4.3.1

AUTO[FLASH] ..................................................................................33

4.3.2

I28F[FLASH] .....................................................................................34

4.3.3

AM29 [FLASH] ..................................................................................35

4.4

[NAND] ....................................................................................................................36

4.5

[EEPROM] ..............................................................................................................37

4.6

[SDRAM] .................................................................................................................37

4.7

[GDB] ......................................................................................................................37

5 JDI ..................................................................................39
ii
JDI , Revision 1.2
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

5.1

JDI....................................................................................................................... 39

5.2

JDI....................................................................................................................... 39

5.3

JDI....................................................................................................................... 39

5.4

JDI ........................................................................................................ 40

iii
JDI , Revision 1.2
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI CPU

JDI Flash EEPROM

JDI
Ethernet
USB
RS-232C
JDI Linux
Ethernet Telnet
TFTP
EJTAG
JDI
gdbserver
JDI FirmWare JDI

1
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI FLASH EEPROM

JDI TFTP Host Linux


Host IP 192.168.1.20
JDI TFTP TFTP
NOR FLASH Intel E28F128(J3A150), NAND FLASH
SAMSUNG K9F280

2.1

JDI 2 USB, RS232

USB, Ethernet, JTAG RS232

2.1.1

JDI JDI

USB JDI

RS232 JDI

JDI Ethernet JDI Ethernet

JTAG JDI

115200bps, 8N1

2.1.2

TFTP

Host TFTP
Linux TFTP
/etc/xinetd.d/tftp (/tftpboot TFTP )

3
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

service tftp
{
disable

= no

socket_type

= dgram

protocol

= udp

wait

= yes

user

root

server

/usr/sbin/in.tftp.d

server_args

= -s /tftpboot

/etc/init.d/xinetd

restart

Windows TFTP TFTP

2.1.3

jz4730-pmp.cfg

;-----------------------------------------------; JDI configuration file for Jz4730 PMP board


;-----------------------------------------------;
[INIT]
; Init INTC
WM32

0xB0001010

0xFFFFFFFF

;clear all intrs

WM32

0xB0001008

0xFFFFFFFF

;mask all intrs

; Init PLL
WM32

0xB0000000

0x10422220

;PLL frequency division register (CFCR)

WM32

0xB0000010

0x50800520

;PLL control register (PLCR1)

; Init memory controller


WM32

0xB0010070

0x40000000

;GPALR2, GPIO as emc

WM32

0xB0010074

0x00005555

;GPAUR2, GPIO as emc

4
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

;
[HOST]
IP

192.168.1.20

;The Host IP

;
[FLASH]
CHIPTYPE

AM29

;FLash type (AUTO|AM29|I28F)

CHIPSIZE

0x00800000

;The size of the flash in bytes

;; Parameters for chiptype I28F and AM29


CHIPWIDTH

16

;The width of the flash chip in bits (8|16|32)

BUSWIDTH

16

;The width of the flash memory bus in bits (8|16|32)

;; Parameters for chiptype AM29


SETUPADDR1

0x555

;The first setup address of chiptype AM29

SETUPADDR2

0x2AA

;The second setup address of chiptype AM29

;
[NAND]
BUSWIDTH

;The width of the NAND flash chip in bits (8|16|32)

ROWCYCLES

;The row address cycles (2|3)

PAGESIZE

2048

;The page size of the NAND chip in bytes(512|2048)

FORCEERASE

;The force to erase flag (0|1). When set, all blocks including that were

marked as bad blocks will be erased. Dont set it during normal operation.
;
[EEPROM]
ADDRESS

;The device address of EEPROM

BUSWIDTH

32

;The bus width of the SDRAM in bits (16|32)

BANKS

;The bank number (2|4)

ROWADDR

13

;Row address width in bits (11-13)

COLADDR

;Column address width in bits (8-12)

CASLATENCY

;CAS latency (2|3)

;
[SDRAM]

;
[GDB]
INITFILE

gdbinit.bin

;Platform-dependent init code, required for gdb debugging

;
;; -- END -<>
Host TFTP

2.1.4

[INIT]

[INIT] JDI
5
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

PLL GPIO PLL CPU


CPU JZ4730

JZ4730 PLL
PLL
(MHz)

PLCR1 (0xB0000010)

=3.6864MHz

=12MHz

PLL

CFCR

(I:S:M:P)

(0xB0000000)

50

0x0d000120

0x03800120

1:2:2:2

0x10411110

100

0x1a800120

0x07800120

1:3:3:3

0x10422220

200

0x35800120

0x10000120

1:4:4:4

0x10433330

300

0x50800120

0x18800120

1:6:6:6

0x10444440

400

0x6c000120

0x20800120

1:8:8:8

0x10455550

1:12:12:12

0x10466660

2.1.5

JDI

JDI Ethernet IP 192.168.1.201 IP


JDI JDI IP TFTP IP

JDI Ethernet 115200bps, 8N1 JDI


JDI USB

JDI>
JDI IP TFTP IP
IP IP
JDI> ipconfig 192.168.1.201
JDI> fconfig 192.168.1.20 jz4730-pmp.cfg
JDI> netmask 255.255.255.0
JDI> gateway 255.255.255.255
JDI> bcast 192.168.1.255
JDI FLASH

2.1.6

JDI

JDI Ethernet JDI( USB )

6
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI >
JDI Telnet telnet JDI

$ telnet 192.168.1.201
JDI>
help

2.1.7

JDI

USB JDI

EEPROM

2.2

EEPROM JDI
JDI EEPROM

2.2.1

[EEPROM]
ADDRESS

[EEPROM] EEPROM EEPROM 7


EEPROM

JDI JDI

2.2.2

EEPROM

EEPROM 8 15 0x11 0x22 0x33 0x44 0x55 0x66


0x77 0x88
8
JDI> eread 8 8
0x008: 00 00 00 00 00 00 00 00
JDI>
7
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

8 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

JDI> eprogv 8 1122334455667788


JDI>
8
JDI> eread 8 8
0x008: 11 22 33 44 55 66 77 88
JDI>
EEPROM EEPROM
TFTP
EEPROM

NOR FLASH

2.3

NOR FLASH NOR FLASH


JDI jz4730
NOR FLASH

2.3.1

jz4730.cfg
[FLASH]
CHIPTYPE

I28F

CHIPSIZE

0x01000000

CHIPWIDTH

16

BUSWIDTH

16

[FLASH][FLASH] NOR FLASH


NOR FLASH FLASH CHIPTYPE
I28F
FLASH 128M bits CHIPSIZE 0x0100000016M bytes

CHIPWIDTH
BUSWIDTH

16 FLASH 16
16 FLASH 16

32 16 FLASH 16
8
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

FLASH 32 FLASH 16
JDI JDI

2.3.2

NOR FLASH

BIN tftpboot
256K BIN test256k.bin jdi TFTP
IP 192.168.1.20

2.3.2.1 NOR FLASH


NOR FLASH NOR FLASH
JDI> readf 0xbfc00000 128
0xbfc00000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
0xbfc00010: 00 10 20 30 40 50 60 70 80 90 a0 b0 c0 d0 e0 f0
0xbfc00020:

0xbfc00070:

JDI>
0xbfc00000 NOR FLASH 128

2.3.2.2 NOR FLASH


JDI NOR FLASH NOR FLASH
256K Binary test256k.bin NOR FLASH 256K
NOR FLASH 128K NOR FLASH

JDI> erase 0xbfc00000 0x20000 2


JDI>
0xbfc00000 NOR FLASH 0x20000 NOR FLASH
128K
2 readf
NOR FLASH 0xFF

JDI> readf 0xbfc00000

128

0xbfc00000:

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

0xbfc00010:

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
9

JDI , Revision 1.3


Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.


0xbfc00070:

ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

JDI>

2.3.2.3 NOR FLASH


NOR FLASH
Binary NOR FLASH
JDI> prog 0xbfc00000 192.168.1.20 jdi/test256k.bin
JDI>
0xbfc00000 NOR FLASH 192.168.1.20 TFTP
IP jdi/test256k.bin
NOR FLASH

JDI> readf 0xbfc00000

128

0xbfc00000:

12 34 56 78 23 45 67 89 ab cd ef 34 56 78 9a bc

0xbfc00010:

aa bb cc dd ee ff 24 68 ac e0 13 57 9b df 11 22


0xbfc00070:

11 33 55 77 99 00 22 44 66 88 ab cd ef 10 22 30

JDI>
jdi/test256k.bin NOR FLASH

NAND FLASH

2.4

NAND FLASH 8 1024 32


512 2 NAND FLASH
FLASH JDI

2.4.1

NAND FLASH jz4730.cfg


[NAND]
BUSWIDTH

ROWCYCLES

PAGESIZE

512

FORCEERASE

10
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

[NAND] NAND FLASH NAND FLASH


BUSWIDTH

8 NAND FLASH 8

ROWCYCLES

2 NAND FLASH

PAGESIZE

512 NAND FLASH 512

FORCEERASE

0 NAND FLASH

JDI JDI

2.4.2

NAND FLASH

BIN tftpboot
256K BIN test256k.bin jdi TFTP
IP 192.168.1.20

2.4.2.1 NAND FLASH


NAND FLASH NAND FLASH

JDI> nread 0 512


0x00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
0x00000010: 00 10 20 30 40 50 60 70 80 90 a0 b0 c0 d0 e0 f0
0x00000020:

0x000001f0:

JDI>
nread 0 NAND FLASH 0 nread
512 512

2.4.2.2 NAND FLASH


JDI NAND FLASH NAND FLASH
256K Binary test256k.bin NAND FLASH 256K
NAND FLASH 16K32 x 512bytes NAND FLASH
16
JDI> nerase

0 16

JDI>
11
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

nerase 0 NAND FLASH 0


16 16 FORCEERASE 0 NAND
nread NAND FLASH
0xFF
JDI> nread 0 512
0x00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000010: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
0x00000020:

0x000001f0:

JDI>

2.4.2.3 NAND FLASH


NAND FLASH
Binary NAND FLASH
JDI> nprog

192.168.1.20 jdi/test256k.bin

JDI>
nprog 0 0 192.168.1.20
TFTP IP jdi/test256k.bin
NAND FLASH

JDI> nread 0 512


0x00000000:

12 34 56 78 23 45 67 89 ab cd ef 34 56 78 9a bc

0x00000010:

aa bb cc dd ee ff 24 68 ac e0 13 57 9b df 11 22


0x000001f0:

11 33 55 77 99 00 22 44 66 88 ab cd ef 10 22 30

JDI>
jdi/test256k.bin NAND FLASH

2.5

GDB

JDI GDB Ethernet GDB


Ethernet JDI
12
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI INITFILEINITFILE BINARY


CPU SDRAM BINARY
0xff2f,0000 0xff2f,0000-0xff2f,1000 GDB
BINARY
GDB JDI debug
JDI> debug [program_entry]
******** pid = 0x3e8 ********
Listening on port 6666
[program_entry] mipsel-linux-gdb
ELF t.elf
0x80001000
$ ./mipsel-linux-gdb

./t.elf

(gdb) target remote 192.168.1.201:6666


Remote debugging using 192.168.1.201:6666
0x00000000

in

?? ()

(gdb)
target remote 192.168.1.201:6666
192.168.1.201 JDI IP
:6666
JDI GDB TCP JDI

(gdb) load
t.elf

(gdb) disp/i
1: x/i $pc

$pc
0x800010b0

<_ftext>: lui

a3, 0xb600

0x800010b0

<_ftext>: lui

a3, 0xb600

(gdb) si
1: x/i $pc
(gdb) si
0xffffffff800010b4
1: x/i $pc

in

0x800010b4

_ftext ()
<_ftext + 4>: ori

a3, a3, 0x58

(gdb) p/x $a3


$1 = 0xb6000000
(gdb) si
13
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

0xffffffff800010b8
1: x/i $pc

in

0x800010b8

_ftext ()
<_ftext + 8>: lui

t0, 0x30

(gdb) si
0xffffffff800010bc
1: x/i $pc

in

0x800010bc

_ftext ()
<_ftext + 12>: sb

t0, 0(a3)

(gdb) p/x $t0


$2 = 0x30
(gdb) q
gdb gdb
gdb gdb JDI gdb

14
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI

JDI JDI
FLASH EEPROM
gdb JDI

JDI

3.1

JDI Telnet

3.1.1

JDI

JDI JDI

115200
8

JDI USB
JDI
JDI JDI> JDI
help
JDI> help
JDI Commands:
help

print this help

ipconfig

set local ip

JDI>

3.1.2

JDI

JDI Telnet telnet


15
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI
$ telnet 192.168.1.201
JDI>
JDI JDI> JDI telnet
192.168.1.201 JDI IP

JDI> help

JDI exit
JDI> exit
$

3.2

JDI

NOR FLASH

JDI

3.2.1

help

help JDI
JDI> help
JDI commands:
help

print this help

ipconfig

set local ip

JDI>
JDI

3.2.2

ipconfig

ipconfig JDI IP
16
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

ipconfig < JDI IP >

JDI> ipconfig 192.168.1.101


JDI>

3.2.3

fconfig

fconfig JDI
fconfig < IP >

<>

JDI> fconfig 192.168.1.20 jz4730/pmp.cfg


JDI>

3.2.4

netmask

netmask JDI
netmask <>

JDI> netmask 255.255.255.0


JDI>

3.2.5

gateway

gateway JDI IP
gateway < IP >

JDI> gateway 255.255.255.255


JDI>

3.2.6

bcast

bcast JDI IP
17
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

bcast < IP >

JDI> bcast 192.168.1.255


JDI>

showcfg

3.2.7

showcfg JDI
showcfg

JDI> showcfg
LOCAL IP: 192.168.1.201
HOST IP : 192.168.1.20
CFGFILE: jdi.cfg

debug

3.3

debug GDB
debug []
[] GDB

JDI> debug
******** pid=0x3e8 ********
Listening on port 6666

FLASH EEPROM

3.4

FLASH EEPROM

EEPROM

NOR FLASH

NAND FLASH

18
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI

3.4.1

EEPROM eread

eread EEPROM
eread start count
EEPROM start count
eread start count file-name
EEPROM start count
file-name TFTP
TFTP
file-name TFTP
TFTP IP JDI [HOST]
eread start count host file-name
host TFTP
IP JDI [HOST]
EEPROM 12 19
JDI> eread
0x00c:

12

11 22 33 44 55 66 77 88

JDI>
EEPROM 256 jdi/eeprom.bin
JDI>eread 0

3.4.2

256

192.168.1.20

jdi/eeprom.bin

EEPROM eprogv

EEPROM eprogv
eprogv

start

hex
hex 16 EEPROM

start hex 16
JDI> eprogv

12

1020304050607080

EEPROM 12 19 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70,


0x80

19
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI> eread 12
0x00c:

10 20 30 40 50 60 70 80

JDI>
eprogv

3.4.3

EEPROM eprog

TFTP EEPROM

eprog start file-name


file-name EEPROM
TFTP TFTP

TFTP IP JDI [HOST]

EEPROM startfile-name

eprog start host file-name

host TFTP IP
file-namehost TFTP

EEPROM 0 jdi/eeprom.bin
TFTP TFTP IP JDI
[HOST]
JDI> eprog

jdi/eeprom.bin

TFTP IP 192.168.1.30

JDI> eprog

3.4.4

192.168.1.30

jdi/eeprom.bin

NOR FLASH query

NOR FLASH JDI NOR FLASH


AUTO NOR FLASH

JDI> query

20
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI>

3.4.5

NOR FLASH sector querya

NOR FLASH sector JDI


NOR FLASH AUTO NOR FLASH
sector
JDI> querya

JDI>

3.4.6

NOR FLASH readf

readf NOR FLASH


NOR FLASH NOR FLASH

readf

address

count

address
NOR FLASH count

readf

address

count file-name

address
NOR FLASH count
file-name TFTP
TFTP
file-name TFTP
TFTP IP JDI [HOST]

readf

address

count

host file-name

host TFTP
IP JDI [HOST]
NOR FLASH 0xbfc00000 256
JDI> readf

0xbfc00000

256

0xbfc00000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
0xbfc00010: 00 10 20 30 40 50 60 70 80 90 a0 b0 c0 d0 e0 f0
0xbfc00020:

0xbfc00100:


21

JDI , Revision 1.3


Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI>
0xbfc00000 NOR FLASH
NOR FLASH 0xbfc0000 256K jdi/norflash.bin

JDI> readf

0xbfc00000

256

jdi/norflash.bin

JDI>

3.4.7

NOR FLASH erase

erase NOR FLASH NOR FLASH


NOR FLASH

erase

address

chip

NOR FLASH
address NOR FLASH chipchip

erase

address

step

count

NOR FLASH address

step

count
NOR FLASH
NOR FLASH
NOR FLASH 0xbfc00000
JDI> erase

0xbfc00000

chip

JDI>
NOR FLASH 256K NOR
FLASH 0xbfc00000 0x20000
JDI> erase 0xbfc00000

0x20000 2

JDI>

3.4.8

NOR FLASH prog

TFTP NOR FLASH


NOR FLASH

22
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

prog address file-name

file-name NOR FLASH


TFTP TFTP
TFTP IP JDI
[HOST]
NOR FLASH addressfile-name

prog address host file-name

host TFTP IP
file-namehost TFTP

256K jdi/test256k.bin TFTP


NOR FLASH 256K NOR FLASH
0xbfc00000
JDI> prog

0xbfc00000

jdi/test256k.bin

JDI>
TFTP IP 192.168.1.30

JDI> prog

3.4.9

0xbfc00000

192.168.1.30

jdi/test256k.bin

NAND FLASH nquery

nquery NAND FLASH NAND FLASH

JDI> nquery
NAND querying completed.
NAND device: Vendor ID 0xec, Chip ID 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)

3.4.10 NAND FLASH nread


nread NAND FLASH
ECC

nread

start

count

NAND FLASH startcount

23
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

nread

start

count file-name

NAND FLASH startcount


file-name TFTP
TFTP
file-name TFTP
TFTP IP JDI [HOST]

nread

start

count host file-name

host TFTP
IP JDI [HOST]
NAND FLASH 0 512
JDI> nread 0 512
0x00000000: 00 11 22 33 44 55 66 77 88 99 aa bb cc dd ee ff
0x00000010: 00 10 20 30 40 50 60 70 80 90 a0 b0 c0 d0 e0 f0
0x00000020:

0x000001f0:

JDI>
NAND FLASH 0 512 jdi/nandflash.bin

JDI> nread

512

jdi/nandflash.bin

JDI>

3.4.11 NAND FLASH nreadraw


nreadraw NAND FLASH
nread
ECC nread

3.4.12 NAND FLASH nreadoob


nreadoob NAND FLASH oob
oob ECC
nread

24
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

3.4.13 NAND FLASH nerase


nerase NAND FLASH NAND FLASH
NAND FLASH

nerase

start

count

NAND FLASH start


count
NAND FLASH 16
JDI> nerase

16

JDI>

3.4.14 NAND FLASH nprog


TFTP NAND FLASH
ECC 256 3 ECCECC
oob 5
pagesize=512
Page Data (512Bytes):
Data0(256)

Data1(256)

255 256

511

OOB (16Bytes):
ECC0(3)
0

0
6

ECC1(3)
8

0
10 11 12

15

ECC0 Data0 3 ECC ECC1 Data1 3 ECC


8 12 0 2KB NAND FLASH ECC

NAND FLASH

nprog start file-name


file-name NAND FLASH
TFTP TFTP
TFTP IP JDI
[HOST]
NAND FLASH startfile-name
25
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

nprog start host file-name

host TFTP IP
file-namehost TFTP

256K jdi/test256k.bin TFTP


NAND FLASH 256K
JDI> nprog

jdi/test256k.bin

JDI>
TFTP IP 192.168.1.30

JDI> nprog

192.168.1.30

jdi/test256k.bin

3.5

JDI
JDI FirmWare
JDI telnet

3.5.1

readids

EJTAG TAP IDCODE IMPCODE JDI


CPU
JDI> readids
target idcode is 0x0000024f, impcode is 0x20404000
JDI>

3.5.2

cputest

CPU JTAG
JDI> cputest
CPU test completed.
CPU runs normally.

26
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

CPU

3.5.3

memtest

SDRAM
memtest address size
addresssize
JDI> memtest 0x80000000 0x1000000
Checking memory from 0x80000000 to 0x80ffffff.
Checking memory passed.
SDRAM JDI [SDRAM]
SDRAM

3.5.4

gpios gpioc

gpiosgpioc GPIO
gpios pin
gpioc pin
pin 01127

3.5.5

hwtest1 hwtest2

CPU memory

JDI> hwtest1
JDI> hwtest2

3.5.6

reset

JDI> reset
Resetting target done.
JDI>

3.5.7

Firmware version

JDI firmware

27
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI> version
The current jdi version is 01.01.06.

3.5.8

FirmWare upgrade

JDI FirmWare FirmWare JDI


JP1
JDI

upgrade
JDI FirmWare
upgrade <hostip> <binary file>
<binary file>
TFTP
TFTP TFTP IP
<hostip>
JDI FirmWare
JDI> upgrade
The current firmware version is 01.01.06
JDI>
JDI FirmWare
JDI> upgrade 192.168.1.20 JDI-FW-01.01.08
JDI>

3.5.9

run

JDI

run <HOST IP> <FILE>


JDI> run 192.168.1.20 jdi-batch
JDI>
jdi-batch 192.168.1.20 TFTP

28
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

nquery
nerase 0 32
nprog 0 t.bin

3.5.10 telnet exit


telnet
JDI> exit
Connection closed by foreign host.
$>

29
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI
JDI
JDI 5

[INIT]
[HOST] TFTP IP
[FLASH] NOR FLASH
[NAND] NAND FLASH
[EEPROM] EEPROM
[SDRAM] SDRAM
[GDB] GDB
JDI

JDI JDI TFTP

JDI

[]

[]

[INIT]
WM32

0xb3010010

0x0fff7700

31
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

[HOST]
IP

192.168.1.20

[FLASH]

4.1

[INIT]

JDI JDI

CP0

4.1.1

CP0 WCP0

CP0
WCP0

<Reg.select>

<Value>

<Value><Reg>Select <Select> CP0


0x1 CP0 Config7 16Select 7
WCP0

16.7

0x1

JZ4730 CPU BTB

4.1.2

CPU
3
WM32

<ADDRESS>

<VALUE>

<Value> 32 <Address>
WM16

<ADDRESS>

<VALUE>

<Value> 16 <Address>
WM8

<ADDRESS>

<VALUE>

<Value> 8 <Address>
32
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JZ4730 CPU EMC


WM32

0xb3010010

0x0fff7700

EMC

4.2

[INIT]

TFTP IP JDI
IP TFTP
IP [HOST] IP
< IP >

IP

JDI IP
JDI

[HOST]
IP

4.3

192.168.1.20

[FLASH]

NOR FLASH JDI NOR FLASH


[FLASH]
NOR FLASH NOR FLASH

JDI 3 AUTOI28F AM29


3 NOR FLASH[FLASH] 3
NOR FLASH

4.3.1

AUTO [FLASH]

NOR FLASH
SST28SF020SST28SF040
SST39VF010SST39VF020SST39VF040
SST39SF010SST39SF020SST39SF040
SST39VF1601SST39VF1602
33
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

SST39VF3201SST39VF3202
SST39VF6401SST39VF6402
CFI NOR FLASH
NOR FLASH [FLASH]
CHIPTYPE

type

CHIPTYPEtype NOR FLASH


typeAUTO
CHIPSIZE

Value

NOR FLASH Value

Value
0x00400000 4M
NOR FLASH [FLASH]
[FLASH]
CHIPTYPE

AUTO

CHIPSIZE

0X00400000

4.3.2

I28F [FLASH]

NOR FLASH Intel 28F NOR FLASH


NOR FLASH FLASH
FLASH
NOR FLASH [FLASH] 4
CHIPTYPE

type

CHIPTYPEtype NOR FLASH


typeI28F
CHIPSIZE

Value

NOR FLASH Value

Value
0x00400000 4M
CHIPWIDTH

Value

NOR FLASH Value

Value
816 32 NOR FLASH

BUSWIDTH

Value

NOR FLASH Value


34
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

16 NOR FLASH 32
32 NOR FLASH 16
[FLASH]CHIPWIDTHBUSWIDTH

Value 816 32

NOR FLASH [FLASH]


[FLASH]
CHIPTYPE

AUTO

CHIPSIZE

0X00400000

CHIPWIDTH

16

BUSWIDTH

16

4.3.3

AM29 [FLASH]

NOR FLASH AMD AM29 NOR FLASH


FLASH
[FLASH] NOR FLASH FLASH
FLASH
NOR FLASH [FLASH] 6
CHIPTYPE

type

CHIPTYPEtype NOR FLASH


typeAM29
CHIPSIZE

Value

I28F FLASH
CHIPWIDTH

Value

I28F FLASH
BUSWIDTH

Value

I28F FLASH
SETUPADDR1

Value

NOR FLASH Value


NOR FLASH NOR FLASH
AMD AM29F040B NOR FLASH Value 0x555
SETUPADDR2

Value
35

JDI , Revision 1.3


Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

NOR FLASH Value


NOR FLASH NOR FLASH
AMD AM29F040B NOR FLASH Value 0x2AA
AMD AM29F040B NOR FLASH [FLASH]

[FLASH]

4.4

CHIPTYPE

AM29

CHIPSIZE

0X00400000

CHIPWIDTH

BUSWIDTH

SETUPADDR1

0x555

SETUPADDR2

0x2AA

[NAND]

NAND FLASH JDI NAND FLASH


NAND FLASH

BUSWIDTH

Value

NAND FLASH <Value> 8 16


8 16 NAND FLASH
ROWCYCLES

Value

NAND FLASH NAND FLASH 2

Value
Value 2 3
PAGESIZE

Value

NAND FLASH Value


512 1024
FORCEERASE

Value

NAND FLASH
Value
1 0 1 0

[NADN]
BUSWIDTH

36
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

4.5

ROWCYCLES

PAGESIZE

512

FORCEERASE

[EEPROM]

EEPROM I2C

ADDRESS

Value

Value EEPROM

[EEPROM]
ADDRESS

4.6

[SDRAM]

memtest SDRAM [SDRAM] SDRAM

BUSWIDTH

Value

SDRAM <Value> 16 32
16 32 SDRAM
BANKS

Value

SDRAM bank <Value> 2 4


SDRAM 2 4 bank
ROWADDR

Value

SDRAM <Value> 11-13


COLADDR

Value

SDRAM <Value> 8-12


CASLATENCY

Value

SDRAM CAS latency <Value> 2 3

4.7

[GDB]

GDB BINARY GDB


SDRAM CPU
37
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

INITFILE

FILENAME

FILENAME BINARY TFTP

38
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

JDI

JDI JDI

5.1

JDI

JDI

JDI

JDI

JDI

JDI 5
USB
JDI

JDI JDI TFTP


RS-232 (PS2)
JDI JDI
JTAG
JDI JTAG
5V
JDI USB JDI 5V

5.2

JDI

JDI
JDI
JDI JTAG

5.3

JDI

JDI JDI FirmWare


JP1 JDI FirmWare
FirmWare JDI JP1
JDI FirmWare JDI FirmWare

39
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

JDI

5.4

JDI

JDI JTAG MIPS EJTAG

40
JDI , Revision 1.3
Copyright 2005-2007 Ingenic Semiconductor Co., Ltd. All rights reserved.

Вам также может понравиться