0x06000000 which represents the 8 option bytes and their complements. You do not
have to care about the option bytes' complements since they are computated auto-
matically. The following table describes the structure of the option bytes sector
Address
0x06000000
0x06000004
0x06000008
0x0600000C
Table 9.1: Option bytes sector description
Note:
Writing a value of 0xFF inside option byte 0 will read-protect the STM32.
In order to keep the device unprotected you have to write the key value 0xA5 into
option byte 0.
Note:
The address 0x06000000 is a virtual address only. The option bytes are
originally located at
0x1FFFF800 is done automatically by J-Flash.
Example
To program the option bytes 2 and 3 with the values 0xAA and 0xBB but leave the
device unprotected your option byte sector (at addr 0x06000000) should look like as
follows:
Address
0x06000000
0x06000004
0x06000008
0x0600000C
Table 9.2: Option bytes programming example
For a detailed description of each option byte, please refer to ST programming man-
ual PM0042, section "Option byte description".
9.15.2.3 Securing/unsecuring the device
The user area internal flash of the STM32 devices can be protected (secured) against
read by untrusted code. The J-Flash software allows securing a STM32F10x device.
For more information about J-Flash, please refer to UM08003, J-Flash User Guide . In
order to unsecure a read-protected STM32F10x device, SEGGER offers two software
components:
•
J-Flash
•
J-Link STM32 Commander (command line utility)
For more information about J-Flash, please refer to UM08003, J-Flash User Guide . For
more information about the J-Link STM32 Commander, please refer to J-Link STM32
Unlock (Command line tool) on page 112.
Note:
Unsecuring a secured device will cause a mass-erase of the internal flash
memory.
9.15.2.4 Hardware watchdog
The hardware watchdog of a STM32F10x device can be enabled by programming the
option bytes. If the hardware watchdog is enabled the device is reset periodically if
the watchdog timer is not refreshed and reaches 0. If the hardware watchdog is
enabled by an application which is located in flash and which does not refresh the
watchdog timer, the device can not be debugged anymore.
J-Link / J-Trace (UM08001)
[31:24]
complement
Option byte 1
complement
Option byte 3
complement
Option byte 5
complement
Option byte 7
address 0x1FFFF800. The remap from 0x06000000 to
[31:24]
0x00
0xFF
0x44
0xBB
0x00
0xFF
0x00
0xFF
[23:16]
[15:8]
complement
complement
complement
complement
[23:16]
[15:8]
0x5A
0x55
0x00
0x00
© 2004-2013 SEGGER Microcontroller GmbH & Co. KG
263
[7:0]
Option byte 0
Option byte 2
Option byte 4
Option byte 6
[7:0]
0xA5
0xAA
0xFF
0xFF
Need help?
Do you have a question about the J-Link and is the answer not in the manual?