EasyManua.ls Logo

Segger J-Link - Page 318

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...
318 CHAPTER 11 J-Flash SPI
J-Link / J-Trace (UM08001) ©
2004-2017 SEGGER Microcontroller GmbH & Co. KG
11.7.3.1 J-Flash project layout
Basically, the custom sequence is separated into different steps where each step con-
tains the fields as in the table below. Some commands require to pass parameter to
it. They are stored in Value0 and Value1 as described in the table below.
The number of exit steps needs to be specified right behind the ExitStep sequence
with the line "NumExitSteps = <NumExitSteps>" (see example below).
Below is a small example excerpt from a J-Flash project, which shows a example
sequence to erase sector 0 of the SPI flash using the 0xD8 command. Further exam-
ples can be found in the installation directory of the J-Link software and documenta-
tion package.
[CPU]
//
// Set write enable
//
ExitStep0_Action = "Activate CS"
ExitStep0_Value0 = 0x00000000
ExitStep0_Value1 = 0x00000000
ExitStep1_Action = "Write data"
ExitStep1_Comment = "Set write enable"
ExitStep1_Value0 = 1
ExitStep1_Value1[1] = 0x06
ExitStep2_Action = "Deactivate CS"
ExitStep2_Comment = "Deactivate CS"
ExitStep2_Value0 = 0x00000000
ExitStep2_Value1 = 0x00000000
//
// Erase sector 0
//
ExitStep3_Action = "Activate CS"
ExitStep3_Comment = "Activate CS"
ExitStep3_Value0 = 0x00000000
ExitStep3_Value1 = 0x00000000
ExitStep4_Action = "Write data"
ExitStep4_Comment = "Set write enable"
ExitStep4_Value0 = 4
ExitStep4_Value1[4] = 0xD8,0x00,0x00,0x00
ExitStep5_Action = "Deactivate CS"
ExitStep5_Comment = "Deactivate CS"
ExitStep5_Value0 = 0x00000000
ExitStep5_Value1 = 0x00000000
//
Step Description
ExitStepX_Action = "$Action$" Any action as described in the table below.
ExitStepX_Comment = "$Comment$"
User can specify any comment here. This field
is optional and not taken into account.
ExitStepX_Value0 = "$Value0$" Value depends on the action. See table below.
ExitStepX_Value1 = "$Value1$" Value depends on the action. See table below.
Actions Parameter Description
Activate CS none Set CS signal low
Deactive CS none Set CS signal high
Write data
Value0=NumBytes
Value1[x]=ByteStream
max. NumBytes is 16
Send a number of bytes via the SPI inter-
face to the SPI. Please note, that the num-
ber of bytes has to be specified right
behind Value1 in square brackets (e.g.:
ExitStep4_Value1[3] = 0x44,0x00,0x10)
Delay Value0=Delay in ms Waits a given time

Table of Contents

Other manuals for Segger J-Link

Related product manuals