High Voltage Sector Protect AN e

AN98556
Cypress High Voltage Sector Group Protection / Un-Protection
AN98556 highlights the High Voltage Sector Group Protection/Unprotection feature supported by Cypress S29AL-J, S9AL-J,
and S29JL-J flash families, including the necessary circuitry to support in-system sector protection management.
1
Sector Protection
Each Cypress flash memory array is portioned into one or more banks and further subdivided into sections called
sectors. For the following discussion, the term sector applies to both boot sectors and sector groups. A sector
group consists of two or more adjacent sectors that are protected or unprotected at the same time. Reference
respective flash data sheet to find details for that device's sector block grouping.
Each sector has control bits that can protect a sector by disabling program and erase functions within the address
boundaries of the sector. Most devices can protect a combination of sectors which comprise the flash array. Flash
devices use a control bit to manage the protection of individual sectors or a group of sectors. From the user
perspective the sector protection can change one or more sectors into ROM type memory that cannot be altered
during normal operation.
Cypress flash can use High Voltage Protection or Advanced Sector Protection to invoke the subject sector
protection depending on the flash family. This document highlights the High Voltage Sector Group Protection/
Unprotection feature supported by Cypress S29AL-J, S9AL-J, and S29JL-J flash families, including the necessary
circuitry to support in-system sector protection management.
2
High Voltage Controlled Sector Group Protection
Sector protection is often used to safeguard critical portions the flash memory map such as boot / application code
or critical data areas. The High Voltage Controlled Sector Group Protection Is a hardware based protection setup
that secures the subject sector(s) against data corruptions such as from viruses or an erroneous flash access.
This high voltage hardware sector group protection feature disables both program and erases operations in the
specified sector group(s). The hardware sector group un-protection feature re-enables both program and erase
operations in a once protected sector group. The Cypress High Voltage Controlled Sector Group Protection uses
the high-voltage VID applied to RESET# as a key used to access the sector protection control bits.
Figure 1 provides an example of the S29AL-J Sector protection and un-protection algorithms; these algorithms
highlight the steps necessary to complete the respective sector protect or unprotect process. Please note prior to
completing a sector group unprotect, all unprotected sector groups must first be protected prior to the first sector
group unprotect write cycle. Cypress flash ships all standard flash devices with sector groups in the unprotected
state.
Please reference the respective data sheet to obtain the subject devices complete algorithms and timing
diagrams. In cases where a module or system design does not support a high voltage source to the flash memory;
flash can be pre-programmed and protected using many commercially available flash programmers prior to
installing the flash in the system module.
www.cypress.com
Document No. 001-98556 Rev. *A
1
Cypress High Voltage Sector Group Protection / Un-Protection
Figure 1. High Voltage Protection Algorithm
START
Protect all sectors:
The indicated portion
of the sector group protect
algorithm must be
performed for all
unprotected sector groups
prior to issuing the
first sector group
unprotect address
START
PLSCNT = 1
RESET# = VID
Wait 1 ms
Temporary Sector
Group Unprotect Mode
No
PLSCNT = 1
RESET# = VID
Wait 1 ms
No
First Write
Cycle = 60h?
First Write
Cycle = 60h?
Yes
No
Yes
All sectors
protected?
Set up sector
group address
Yes
Set up first sector
group address
Sector Group Protect:
Write 60h to sector group
address with
A6 = 0,
A3 = A2 = 0,
A1 = 1, A0 = 0
Sector Group Unprotect:
Write 60h to sector
address with
A6 = 1,
A3 = A2 = 0,
A1 = 1, A0 = 0
Wait 150 µs
Increment
PLSCNT
Verify Sector Group
Protect: Write 40h
to sector group address
with A6 = 0,
A3 = A2 = 0,
A1 = 1, A0 = 0
Read from
sector group address
with A6 = 0,
A3 = A2 = 0,
A1 = 1, A0 = 0
Wait 1.5 ms
Reset
PLSCNT = 1
Increment
PLSCNT
No
Yes
Device failed
Verify Sector Group
Unprotect: Write
40h to sector group
address with
A6 = 1,
A3 = A2 = 0,
A1 = 1, A0 = 0
Read from
sector group address
with A6 = 1,
A3 = A2 = 0,
A1 = 1, A0 = 0
No
PLSCNT
= 25?
Temporary Sector
Group Unprotect Mode
Data = 01h?
No
Yes
Protect another
sector group?
Yes
PLSCNT
= 1000?
Yes
No
Remove VID
from RESET#
Device failed
No
Data = 00h?
Set up
next sector group
address
Yes
Last sector
No
group verified?
Yes
Write reset
command
Sector Group
Protect Algorithm
Sector Group
Unprotect Algorithm
Sector Group
Protect complete
Remove VID
from RESET#
Write reset
command
Sector Group
Unprotect complete
www.cypress.com
Document No. 001-98556 Rev. *A
2
Cypress High Voltage Sector Group Protection / Un-Protection
3.
In-System Sector Protection Management
Cypress High Voltage Controlled Sector Group Protection allows management of the flash sector protection after
the flash device is mounted on the system module. In such cases, there must be a module or system design
provision to support the high voltage VID flash input requirements. This approach provides the option for memory
to perform post assembly flash programming followed by sector protection later in the manufacturing processes.
This type of configuration can also provide an option for updating software in the critical sectors after unit has
been shipped to end customers. For in-system programming or reprogramming, Cypress flash can be temporarily
unprotected by applying VID (11.5V to 12.5V) to the RESET# pin. When VID is removed from the RESET# pin, all
sectors return to their previous state of protection. The flash families S29AL, S29AS, S29JL, and AM29F series
allow the sector protection bits to be cleared and reprogrammed to protect a different combination of sectors, via
software commands while the device is in the temporary unprotect mode. (See the respective data sheet sections
entitled “Sector Protection / Un-protection” and “Temporary Sector Unprotect” for additional details.)
4
Method for Providing High Voltage Isolation to the System Reset
Cypress recommends that a design employ an interface between the system Reset signal and the RESET# pin of
the flash. The RESET# input enables appropriate control to the flash State Machine during power up and power
down, along with the rest of the system. This system reset uses standard logic levels as specified in the subject
data sheet. To address the situation where the high voltage VID is applied to the flash RESET# pin, a small circuit
can be added to the design. This circuit configuration enables the normal logic level inputs to function and to
achieve system isolation from the high voltage V ID when applied. Figure 2 shows the use of series resistor
between the RESET# pin and the system level Reset signal along with a Schottky diode between the system reset
and the system VCC.
Figure 2. RESET# Pin Isolation Circuitry
+12V
10 kW
System RESET
Flash RESET# Pin
Schottky
Diode
VCC (3V or 5V)
When VID is not connected to the flash RESET# pin, the series resistor allows the normal logic level on the system
reset to propagate to the flash memory. The flash RESET# pin is low capacitance, and in combination with the
added resistor, the rise time of the reset signal is still typically <300 ns. The normal flash reset functionality is not
hindered by the series resistor. When high voltage is applied to the RESET# pin, the resistor limits current flow to
the system reset signal. The maximum current flow to the system reset (when the system asserts VIL on the
system reset signal) is 1.2 mA. The Schottky diode guarantees a clamp on the system reset signal to no more
than VCC + ~0.3V. ESD protection diodes already built into the inputs of other devices attached to the system
reset signal could serve a similar purpose, but the typical 0.7V voltage rise induced by these diodes would clamp
the voltage to a level which exceeds the VIH max data sheet parameter. Use of a Schottky diode clamp provides a
means not to exceed the VIH parameter. The resistor and diode combination form the isolation circuitry and
present very minimal additional system cost while enabling the flexibility of in-system sector protection
management.
www.cypress.com
Document No. 001-98556 Rev. *A
3
Cypress High Voltage Sector Group Protection / Un-Protection
5.
Methods for Providing High Voltage to the Flash Device RESET# Pin
The flash RESET# is a high impedance input and does not the VID signal to provide significant current; the voltage
level is detected by the flash input. The rise and fall time, when transitioning between normal logic signal voltage
levels and VID, must be limited to tVIDR (500 ns) minimum. There must also be a delay of tRSP (4 µs) after VID is
reached before any writing to the flash memory is begun.
Some systems do not have 12V available, but can provide a 12V supply from an outside source such as a
manufacturing test system, daughter card, debug system, or via an external cable or connection. Such an external
supply may only be available at a factory or service center location. This method is the simplest in that only a
connection to the flash RESET# pin needs to be provided. The voltage source and method for switching it on and
off are external to the system being programmed. The system carries no burden of extra circuitry to create and
control the high voltage. This approach also ensures that there is no way for the system to accidentally switch on
the unlock voltage; without the external voltage supply to override sector protection.
For systems where a 12V source is available, it may be desirable to allow the 12V supply to be switched to the
flash RESET# pin within the system. One suggestion for switching the VID level is shown in Figure 3. By placing a
P-channel MOSFET between the VID source and the flash RESET# pin. The gate of the P-channel MOSFET is
pulled up to VID through a 100 k resistor. The gate of the P-channel device can be pulled down to ground by a
TTL logic level controlled N-channel MOSFET. Depending on the operational characteristics of the P-channel
MOSFET, and the characteristics of the RV Control signal, the gate voltage may require conditioning using a 5K
and 100 pF RC circuit. This allows the turn on and off delay of the P-channel to ensure that the rise and fall time of
VID is 500 ns. The gate of the logic level N-channel MOSFET is driven by a system control signal to enable the
sector protection unlock voltage. A 100 K resistor from the VID source to VCC is recommended for situations
where the VID supply is not always connected (or not always active) to keep the MOSFETs properly biased.
Figure 3. VID Routing Circuitry
+12V
100 kW
VCC
100 kW
100 kW
RV
Control
System
RESET
10 kW
RESET# Pin
Schottky
Diode
VCC
Cypress High Voltage Sector Group Protection / Un-protection also supports a “Temporary Sector Group
Unprotect” feature allowing the temporary un-protection of previously protected sector groups to change data insystem. The Sector Group Unprotect mode is activated by setting the RESET# pin to VID. During this mode,
www.cypress.com
Document No. 001-98556 Rev. *A
4
Cypress High Voltage Sector Group Protection / Un-Protection
formerly protected sector groups can be programmed or erased by selecting the sector group addresses. Once
VID is removed from the RESET# pin, all the previously protected sector groups are protected again. Reference
Figure 4 to see S29AL016 example of the Temporary Sector Group Unprotect Operation.
Figure 4. Temporary Sector Group Unprotect Operation
Start
RESET# = VID
(Note 1)
Perform Erase or
Program Operations
RESET# = VIH
Temporary Sector Group
Unprotect Completed
(Note 2)
Notes:
1. All protected sector unprotected. (If WP# = VIL, the highest or lowest address sector remains protected for uniform sector devices; the top
or bottom two address sectors remains protected for boot sector devices).
2. All previously protected sector groups are protected once again.
6
Conclusion
Cypress NOR flash memory array is partitioned into one or more banks and further subdivided into sections called
sectors. Cypress provides a high voltage sector group protection/un-protection feature to enable a designer the
option to protect selected area in the flash memory array from inadvertent erasure or programming. This high
voltage sector group protection/un-protection feature requires the application of super-voltage VID to the flash
RESET# while executing the sector group protection or un-protection algorithm. This application note highlighted
that high voltage sector group protection / un-protection feature can be used during programming on commercial
programming equipment or via in-system with appropriate system design considerations.
www.cypress.com
Document No. 001-98556 Rev. *A
5
Cypress High Voltage Sector Group Protection / Un-Protection
Document History Page
Document Title: AN98556 - Cypress High Voltage Sector Group Protection / Un-Protection
Document Number: 001-98556
Rev.
ECN No.
Orig. of
Change
Submission
Date
Description of Change
**
–
–
10/28/2011
Initial version
*A
4958564
MSWI
10/12/2015
Updated in Cypress template
www.cypress.com
Document No. 001-98556 Rev. *A
6
Cypress High Voltage Sector Group Protection / Un-Protection
Worldwide Sales and Design Support
Worldwide Sales and Design Support
Cypress maintains a worldwide network of offices, solution centers, manufacturers’ representatives, and distributors. To find the
office closest to you, visit us at Cypress Locations.
#
999
Products
PSoC® Solutions
Automotive..................................cypress.com/go/automotive
psoc.cypress.com/solutions
Clocks & Buffers ................................ cypress.com/go/clocks
PSoC 1 | PSoC 3 | PSoC 4 | PSoC 5LP
Interface......................................... cypress.com/go/interface
Cypress Developer Community
Lighting & Power Control ............cypress.com/go/powerpsoc
Memory........................................... cypress.com/go/memory
PSoC ....................................................cypress.com/go/psoc
Touch Sensing .................................... cypress.com/go/touch
Community | Forums | Blogs | Video | Training
Technical Support
cypress.com/go/support
USB Controllers ....................................cypress.com/go/USB
Wireless/RF .................................... cypress.com/go/wireless
MirrorBit®, MirrorBit® Eclipse™, ORNAND™, EcoRAM™ and combinations thereof, are trademarks and registered trademarks of Cypress Semiconductor Corp. All
other trademarks or registered trademarks referenced herein are the property of their respective owners.
Cypress Semiconductor
198 Champion Court
San Jose, CA 95134-1709
Phone:
Fax:
Website:
408-943-2600
408-943-4730
www.cypress.com
© Cypress Semiconductor Corporation, 2011-2015. The information contained herein is subject to change without notice. Cypress Semiconductor Corporation
assumes no responsibility for the use of any circuitry other than circuitry embodied in a Cypress product. Nor does it convey or imply any license under patent or
other rights. Cypress products are not warranted nor intended to be used for medical, life support, life saving, critical control or safety applications, unless pursuant
to an express written agreement with Cypress. Furthermore, Cypress does not authorize its products for use as critical components in life-support systems where a
malfunction or failure may reasonably be expected to result in significant injury to the user. The inclusion of Cypress products in life-support systems application
implies that the manufacturer assumes all risk of such use and in doing so indemnifies Cypress against all charges.
This Source Code (software and/or firmware) is owned by Cypress Semiconductor Corporation (Cypress) and is protected by and subject to worldwide patent protection (United States and foreign), United States copyright laws and international treaty provisions. Cypress hereby grants to licensee a personal, non-exclusive,
non-transferable license to copy, use, modify, create derivative works of, and compile the Cypress Source Code and derivative works for the sole purpose of creating
custom software and or firmware in support of licensee product to be used only in conjunction with a Cypress integrated circuit as specified in the applicable agreement. Any reproduction, modification, translation, compilation, or representation of this Source Code except as specified above is prohibited without the express written permission of Cypress.
Disclaimer: CYPRESS MAKES NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cypress reserves the right to make changes without
further notice to the materials described herein. Cypress does not assume any liability arising out of the application or use of any product or circuit described herein.
Cypress does not authorize its products for use as critical components in life-support systems where a malfunction or failure may reasonably be expected to result in
significant injury to the user. The inclusion of Cypress' product in a life-support systems application implies that the manufacturer assumes all risk of such use and in
doing so indemnifies Cypress against all charges.
Use may be limited by and subject to the applicable Cypress software license agreement.
www.cypress.com
Document No. 001-98556 Rev. *A
7