EasyManua.ls Logo

Segger J-Link - J-Flash SPI Command Line Version

Segger J-Link
480 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
317
11.7.3 J-Flash SPI Command Line Version
As the Init / Exit Steps are stored in the J-Flash project file, which is evaluated in the
command line version of J-Flash SPI too, the custom command sequence feature can
be used under Linux / MAC, as well. The project can be either created using the GUI
version of J-Flash SPI or by editing the *.jflash project, manually. The exepected for-
mat of the custom command sequences in the J-Flash project file is described below.
# Action Value0 Value1 Comment
0 Activate CS -- -- Activate CS
1 Write Data 1 06 Send command: Write Enable
2 Deactivate CS -- -- Deactivate CS
3 Activate CS -- -- Activate CS
4 Write Data 4 44,00,10,00
Send command: Erase Security Regis-
ter 1
5 Deactivate CS -- -- Deactivate CS
6 Delay 200 ms --
Wait until security register 1 has been
erased
7 Activate CS -- -- Activate CS
8 Write Data 4 48,00,10,00
Send Read Security Register: 1b com-
mand + 3b addr
9 Write Data 1 FF Send 8 dummy clocks
10 Var Read Data 0 16
Read actual security register data (16
byte) into Varbuffer[0]
11 Deactivate CS -- -- Deactivate CS
12 Var AND 0 0x00 Set byte 0 to 0x00 using Var AND
13 Var OR 0 0x12 Set byte 0 to 0x12 using Var OR
14 Var AND 6 0x00 Set byte 6 to 0x00 using Var AND
15 Var OR 6 0x12 Set byte 6 to 0xAB using Var OR
16 Var AND 12 0x00 Set byte 12 to 0x00 using Var AND
17 Var OR 12 0x12 Set byte 12 to 0xCC using Var OR
18 Var AND 15 0x00 Set byte 15 to 0x00 using Var AND
19 Var OR 15 0x12 Set byte 15 to 0x4E using Var OR
20 Activate CS -- -- Activate CS
21 Write Data 1 06 Send command: Write Enable
22 Deactivate CS -- -- Deactivate CS
23 Activate CS -- -- Activate CS
24 Write Data 4 42,00,10,00
Send command: Program Security
Register 1
25 Var Write Data 0 16 Send data: Program sec reg 1_1
26 Deactivate CS -- -- Deactivate CS
27 Delay 200 ms --
Wait until security register 1 has been
erased
28 Activate CS -- -- Activate CS
29 Write Data 4 48,00,10,00
Send Read Security Register: 1b com-
mand + 3b addr
30 Write Data 1 FF Send 8 dummy clocks
31 Var Read Data 0 16
Read actual security register data (16
byte) into Varbuffer[0]
32 Deactivate CS -- -- Deactivate CS
Table 11.12: J-Flash SPI Custom Command Sequence example

Table of Contents

Other manuals for Segger J-Link

Related product manuals