S6E2CC/C5/C4/C3/C2/C1 Series Flash Programming Specification, Document Number: 002-04913 Rev. *D
60
2.1 Overview
This section explains the overview of the flash security.
If the protection code of 0x0001 is written in the security code area of MainFlash memory, access to the MainFlash
memory is restricted. Once the flash memory is protected, performing the flash erase operation only can unlock the
function otherwise read/write access to the MainFlash memory from any external pins is not possible.
This function is suitable for applications requiring security of self-containing program and data stored in the flash memory.
Table 2-1 shows the address and the protection code of the security code.
Table 2-1 Address of Security Code and Protection Code
Address
Protection Code
0x0040_0000
0x0001
Note:
The above address of security code is the address while the DualFlash mode is disabled.
When the DualFlash mode and the Re-map function are enabled, the address is changed.
For the detail, please refer to Chapter
“MainFlash Memory”.
2.2 Operation Explanation
This section explains the operation of the flash security.
Setting Security
Write the protection code 0x0001 in address of the security code. The security is enabled and set after all the reset factors
are generated or after turning on the power again.
Releasing Security
1. Issue the flash erase command to the Flash Macro #1 of MainFlash memory.
2. Confirm if the flash erase operation for the Flash Macro #1 of MainFlash memory is completed.
3. Issue the flash erase command to the Flash Macro #0 of MainFlash memory where the security code is stored.
4. The security is released by all the reset factors or power-on after the execution of flash erase.
Operation with Security Enabled
The operations with security enabled vary depending on each mode.
shows the security operations in each mode.
Table 2-2 Flash Operation with Security Enabled
Mode
Mode Pin
MD[1:0]
Access to Flash
Access from
JTAG Pins
Flash Erase
Other
Commands
Read
User mode
"00"
Enabled
Enabled
Valid data
Disabled
Serial writer mode
"01"
Enabled
Disabled
Invalid data
Disabled
Notes:
Writing the protection code is generally recommended to take place at the end of the flash programming.
This is to avoid unnecessary protection during the programming.
In user mode, there is no limit to flash memory even during security is enabled. However, JTAG pins are fixed not to
access internally from these pins during security is enabled. To release security, perform the flash erase operation using a
serial writer because the security cannot be released through JTAG pins.
When security enabled, the obstruction analysis of the flash memory cannot be performed.
When the security is released, erase the data of Flash Macro #1 of MainFlash memory at first. The data of Flash Macro
#0 of MainFlash memory cannot be erased before erasing the data of Flash Macro #1 of MainFlash memory.