J-Link / J-Trace (UM08001) © 2004-2017 SEGGER Microcontroller GmbH & Co. KG
409
15.16.1 STR91x
15.16.1.1JTAG settings
These device are ARM966E-S based. We recommend to use adaptive clocking for
these devices.
15.16.1.2Unlocking
The devices have 3 TAP controllers built-in. When starting J-Link.exe, it reports 3
JTAG devices. A special tool, J-Link STR9 Commander (
JLinkSTR91x.exe) is available
to directly access the flash controller of the device. This tool can be used to erase the
flash of the controller even if a program is in flash which causes the ARM core to
stall. For more information about the J-Link STR9 Commander, please refer to
J-Link
STR91x Commander (Command line tool)
on page 151.
When starting the STR91x commander, a command sequence will be performed
which brings MCU into Turbo Mode.
"While enabling the Turbo Mode, a dedicated test mode signal is set and controls the
GPIOs in output. The IOs are maintained in this state until a next JTAG instruction is
sent." (ST Microelectronics)
Enabling Turbo Mode is necessary to guarantee proper function of all commands in
the STR91x Commander.
15.16.1.3Switching the boot bank
The bootbank of the STR91x devices can be switched by using the J-Link STR9 Com-
mander which is part of the J-Link software and documentation package. For more
information about the J-Link STR9 Commander, please refer to
J-Link STR91x Com-
mander (Command line tool)
on page 151.
15.16.2 STM32F10xxx
These devices are Cortex-M3 based.
All devices of this family are supported by J-Link.
15.16.2.1ETM init
The following sequence can be used to prepare STM32F10xxx devices for 4-bit ETM
tracing:
int v;
//
// DBGMCU_CR, enable trace I/O and configure pins for 4-bit trace.
//
v = *((volatile int *)(0xE0042004));
v &= ~(7 << 5); // Preserve all bits except the trace pin configuration
v |= (7 << 5); // Enable trace I/O and configure pins for 4-bit trace
*((volatile int *)(0xE0042004)) = v;
15.16.2.2 Option byte programming
J-Flash supports programming of the option bytes for STM32 devices. In order to
program the option bytes simply choose the appropriate Device, which allows option
byte programming, in the CPU settings tab (e.g.
STM32F103ZE (allow opt.
bytes)
). J-Flash will allow programming a virtual 16-byte sector at address