Application Note, V1.0, Jul AP08049 XC886/888CLM. Migration of Flash to ROM Device: Memory Protection Configurations.

Similar documents
Application Note, V 1.1, Apr AP08006 C868. Interfacing SPI/I2C Serial EEPROM with C868 Microcontroller. Microcontrollers. Never stop thinking.

Application Note, V1.0, Aug AP08064 XC866/886/888. Safeguarding the Microcontroller under Out-of-Spec Noise Conditions.

Application Note, V 1.1, Feb AP DAP Connector. Microcontrollers

XE166 Family AP Application Note. Microcontrollers. X E D r i v e C a r d H a r d w a r e D e s c r i p t i o n Board REV.

XC2000 Family AP Application Note. Microcontrollers. XC2236N Drive Card Description V1.0,

Application Note, V1.3, September 2008 AP XC2000/XE166 Family. Microcontrollers

Application Note No. 097

Industrial PROFET. Universal Application Board User s Manual

AP XC2000 & XE166 Families. Design Guidelines for XC2000 & XE166 Microcontroller Board Layout. Microcontrollers

Operating temperature T a

Smart High-Side Power Switch BSP742RI PG-DSO8. AEC qualified Green product (RoHS compliant)

Application Note, V1.0, November AP XC2000/XE166 family. ADC Result Handling on XC2000/XE166 family of Microcontrollers.

NovalithIC H-Bridge Demo Board

XE166 Family AP Application Note. Microcontrollers. UConnect XE162N Hardware Description V1.0,

Easy Kit Board Manual

XC800 Family AP Application Note. Microcontrollers. Programming the BMI value in the XC82x and XC83x products V1.0,

CRC Computation using PCP

Application Note, V 1.0, April 2005 AP32086 EMC. Design Guideline for TC1796 Microcontroller Board Layout. Microcontrollers. Never stop thinking.

Design Guideline for TC1782 Microcontroller Board Layout

Scope: SW Installation: Start the Package PROG-KIT. Current. Page 1

Design Guideline for TC1791 Microcontroller Board Layout

XE164 UConnect Manual, V.1.1, February XE164 UConnect. Board REV. 2007/40. Microcontrollers. Never stop thinking.

XC800 Family AP Application Note. Microcontrollers. Capacitive-Touch Color Wheel Implementation V1.0,

AP16050 SAB C161V/K/O. Emulating an asynchronous serial interface (ASC) via software routines. Microcontrollers. Application Note, V 1.0, Feb.

Application Note, V1.0, Jul AP XC16x. Interfacing the XC16x Microcontroller to a Serial SPI EEPROM. Microcontrollers

Design Guideline for TC1798 Microcontroller Board Layout

Chip Card & Security ICs SLE Intelligent 1024 Byte EEPROM with Write Protection and Programmable Security Code

Chip Card & Security ICs SLE Intelligent 256-Byte EEPROM with Write Protection function and Programmable Security Code

TLS202B1. Demonstration Board Manual. Automotive Power. Demonstration Board Manual. Rev. 1.0,

Smart High-Side Power Switch for Industrial Applications One channel: 1 x 1 Ω

Queued SSC V

XMC1000 EEPROM emulation and data retention

PROFET TM + Demoboard. Automotive Power. Smart High-Side Power Switch - Demoboard Description. Rev. 1.4,

Relaisdriving with HITFETs and SPIDERs

Documentation Addendum, V1.2, Aug TC Bit Single-Chip Microcontroller Delta BC-to-BE Step. Microcontrollers

XC82x/XC83x. DMX512 Receiving Device with XC836. Application Note. Microcontrollers AP08131 V1.1,

Application Note No. 100

Security & Chip Card ICs SLE 55R04. Intelligent 770 Byte EEPROM with Contactless Interface complying to ISO/IEC Type A and Security Logic

ESD5V3U4RRS. Type Package Configuration Marking ESD5V3U4RRS SOT363 6 pins, uni-directional E8s

Application Note AN V1.3 August Module with adapted driver electronics

Application Note, V3.0, June 2006 AP TC179x. TC179x Examples Collection. Microcontrollers

XMC LED current control explorer kit

ASCLIN Asynchronous Synchronous Interface

Application Note TLE9252V. About this document. Application Note. Safety Recommendations Z8F

AP16051 SAB C161K/V/O. Emulating an asynchronous serial interface (ASC) via the on-chip synchronous serial interface (SSC) Microcontrollers

SPI Protocol of the TLE941xy family

RF Power Product Selection Guide LDMOS Transistors and ICs

Application Note, V1.0, Feb AP LIN Application for XC164CM Using DAvE LIN Configuration tool. Microcontrollers

ESD8V0L... ESD8V0L1B-02LRH. Type Package Configuration Marking ESD8V0L1B-02EL

Application Note, V1.0, Feb AP XC166 family. Software implementation of Trigonometric functions using CORDIC Algorithm.

Dual H-Bridge shield. Dual H-Bridge shield - board user manual. Shield for DC motor control with IFX9202. About this document.

XC2000 series Board Manual, V.1.0, June XC2000 Easy Kit. Board REV. V1.0. Microcontrollers. Never stop thinking.

Sensor supply in bus mode

TLx5012B 2go Evaluation Kit

AP XC16x. How to generate a successful ROM mask for XC16x microcontrollers. Microcontrollers. Application Note, V 0.1, Sep.

Absolute Pressure Sensor

Security & Chip Card ICs SLE 4436/36E

TLT807B0EPV Demoboard

Power Management & Drives. Application Note. February AN-EVAL 2x8-ISO1H815G-1

LOW EMI PWM INTELLIGENT POWER HIGH SIDE SWITCH

DatasheetDirect.com. Visit to get your free datasheets. This datasheet has been downloaded by

Linear movement with a 3D sensor

OPTIGA TM Trust B SLE95250

3D Magnetic Sensor 2 Go - TLE493D-A2B6

Application Note - PCB Layout & PIN Behavior Assessment

Application Note No. 104

TxD GND V CC. RxD WAKE V IO SCLK MISO. (Top-side x-ray view) SCLK INH

SPOC +2 User Manual Multichannel SPI High-Side Power Controller

.dp Interface Gen2 Firmware Update for XDPL8220

XC2000/XE166 Family AP Application Note. Microcontrollers. FOC Motor Drive Kit with TLE5012 Speed and Position Sensor V1.

MCETool V2 User Manual

IRPS5401 programming guide

PMA71xx/ PMA51xx. Application Whitepaper. Wireless Control. SmartLEWIS TM MCU

Getting Started with the XDPL8220 Reference Board Using.dp Vision Software

BNO055 Xplained pro Getting Started Guide

Cyber security mechanisms for connected vehicles

XMC1000. Device Guide. Microcontrollers. Interrupt Subsystem V Microcontroller Series for Industrial Applications.

Infineon Flash Programmer Memtool for XMC1000 Family. XMC Microcontrollers January 2016

U qj fxj styj ymj sj ufhpflj inrj sxntsxfwhhtwinsl yt U H S 755>26892F

AN4491 Application note

U qj fxj styj ymj sj ufhpflj inrj sxntsxfwhhtwinsl yt U H S 755>26892F

BNO055 USB Stick user guide

CardOS Secure Elements for Smart Home Applications

XE166 family Easy Kit

AN3965 Application note

BMP280 Digital pressure sensor

Boot Loader for the Z51F6412 MCU

TPMS SP37T. ROM Library Function Guide. Sense & Control. Tire Pressure Monitoring Sensor

User Guide for MA Evaluation Boards MA12040/MA12040P/MA12070/MA12070P

multi-tof platform Quick Start Guide Version 1

U qj fxj styj ymj sj ufhpflj inrj sxntsxfwhhtwinsl yt U H S 755>26892F

Application Note, V 1.0, Sep AP TC1796 step B. Micro Link Interface: Quick Start. Microcontrollers. Never stop thinking.

TLE5xxx(D) Calibration 360

S3 Flash In-System Programmer

Server side management system for multiple IoT terminals in industrial systems

Flash Loader Utility for the Z8 Encore! XP MCU

This user manual describes the VHDL behavioral model for NANDxxxxxBxx flash memory devices. Organization of the VHDL model delivery package

Software Document MCU Driver Porting Guide

U qj fxj styj ymj sj ufhpflj inrj sxntsxfwhhtwinsl yt U H S 755>26892F

8-Bit AP Application Note. Microcontrollers. Microcontroller. XC878 Class B Software Library V

Transcription:

Application Note, V1.0, Jul. 2006 AP08049 XC886/888CLM Migration of Flash to ROM Device: Memory Protection Configurations Microcontrollers

Edition 2006-07 Published by Infineon Technologies AG 81726 München, Germany Infineon Technologies AG 2006. All Rights Reserved. LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY, CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT. THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION. INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND (INCLUDING WITHOUT LIMITATION WARRANTIES OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY) WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE. Information For further information on technology, delivery terms and conditions and prices please contact your nearest Infineon Technologies Office (www.infineon.com). Warnings Due to technical requirements components may contain dangerous substances. For information on the types in question please contact your nearest Infineon Technologies Office. Infineon Technologies Components may only be used in life-support devices or systems with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system, or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body, or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered.

XC886/888CLM Revision History: V1.0, 2006-07 Previous Version(s): none Page Subjects (major changes since last revision) We Listen to Your Comments Any information within this document that you feel is wrong, unclear or missing at all? Your feedback will help us to continuously improve the quality of this document. Please send your proposal (including a reference to this document) to: mcdocu.comments@infineon.com Application Note V1.0, 2006-07

1 Introduction AP08049 Introduction This Application Note serves as a guideline for memory protection considerations when migrating from a XC886/888 Flash device to a XC886/888 ROM device. The XC886/888 product family offers both Flash and ROM devices with either 24 Kbytes or 32 Kbytes of program memory. For Flash devices, this consists of several P-Flash and D-Flash banks, while for ROM devices, this consists of a single ROM block. Figure 1 shows the memory maps of 32-Kbyte Flash and ROM devices. FFFF H FFFF H XRAM 1.5 Kbytes F600 H F000 H XRAM 1.5 Kbytes F600 H F000 H Boot ROM 12 Kbytes Boot ROM 12 Kbytes D-Flash Bank 1 (as data) 4 Kbytes C000 H C000 H D-Flash Bank 0 (as data) 4 Kbytes B000 H D-Flash Bank 0 4 Kbytes B000 H A000 H A000 H D-Flash Bank 0 (as program) 4 Kbytes 8000 H 8000 H D-Flash Bank 1 (as program) 4 Kbytes 7000 H 6000 H P-Flash Banks 4 and 5 2 x 4 Kbytes 4000 H ROM 32 Kbytes - 4 bytes 1) P-Flash Banks 2 and 3 2 x 4 Kbytes 2000 H P-Flash Banks 0 and 1 2 x 4 Kbytes 0000 H 0000 H 24K P-Flash + 8K D-Flash Device 32K ROM Device 1) The last four bytes of the ROM in the ROM device from 7FFC H to 7FFF H are reserved for the ROM signature and cannot be used for user code or data. Figure 1 Memory Maps of 32 Kbyte Flash and ROM Devices Application Note 4 V1.0, 2006-07

Introduction ROM devices have an additional 4-Kbyte D-Flash bank on top of the 24- or 32-Kbyte ROM size. However, the last four bytes of the ROM (7FFC H to 7FFF H in both 24- and 32- Kbyte variants) are reserved for the ROM signature and cannot be used to store user code or data. Note: Although the ROM device contains either a 24- or 32-Kbyte ROM, the maximum size of code that can be placed in the ROM is the given size less 4 bytes. Note: If a Flash to ROM device migration is being considered, user should not use the 4 bytes from 7FFC H to 7FFF H in the Flash device. When migrating from a Flash to ROM device, it is possible to put all of the code (up to 32 Kbytes less 4 bytes) from the Flash device (whether it is in P-Flash or D-Flash) inside the ROM. Table 1 and Table 2 show two examples of Flash to ROM migration. Table 1 Example 1: Migrating from 32-Kbyte Flash to ROM Device (27 Kbytes of Code and 5 Kbytes of Data) Flash Device Configuration ROM Device Configuration Code size: 27 Kbytes Code size: 27 Kbytes Data size: 5 Kbytes Data size: 4 Kbytes (ROM device only has 4 Kbytes of D-Flash memory) Physical memory used for code: All 24 Kbytes of P-Flash + 3 Kbytes of D-Flash bank 1 Physical memory used for code: 27 Kbytes of ROM Physical memory used for data: All 4 Kbytes of D-Flash bank 0 + 1 Kbyte of D-Flash bank 1 Physical memory used for data: All 4 Kbytes of D-Flash bank Application Note 5 V1.0, 2006-07

Introduction Table 2 Example 2: Migrating from 32-Kbyte Flash to ROM Device (31 Kbytes of Code and 1 Kbyte of Data) Flash Device Configuration ROM Device Configuration Code size: 31 Kbytes Code size: 31 Kbytes Data size: 1 Kbyte Data size: 1 Kbyte Physical memory used for code: All 24 Kbytes of P-Flash + All 4 Kbytes of D-Flash bank 1 + 3 Kbytes of D-Flash bank 0 Physical memory used for code: 31 Kbytes of ROM Physical memory used for data: 1 Kbyte of D-Flash bank 0 Physical memory used for data: 1 Kbyte of D-Flash bank Application Note 6 V1.0, 2006-07

2 Memory Protection Scheme Memory Protection Scheme The protection scheme of XC886/888 is based on the single byte password, which is programmable by user via BSL mode 6. Once a valid password (user-defined password field must be non-zero) has been programmed, all external access to the device will be blocked. This will automatically disable the debug mode as well. The format of the user programmable password is shown in Table 3. Table 3 User Programmable Password Bit Fields Bits Size Usage Value 7 1-bit Flash hardware protection mode selection bit 6:5 2-bit Select field for Flash banks to be erased during unprotection 4 1-bit Flash hardware protection enable bit 3:0 4-bit User-defined password field 0 Flash hardware protection mode 0 is selected. 1 Flash hardware protection mode 1 is selected. This field has no effect if Flash hardware protection mode 1 is selected (bit 7 = 1). In this mode, all Flash banks will be erased during unprotection. 00 Only P-Flash banks are erased during unprotection. 01 P-Flash banks and D-Flash bank 0 are erased during unprotection. 10 P-Flash banks and D-Flash bank 1 are erased during unprotection. 11 All Flash banks (P-Flash and D-Flash) are erased during unprotection. 0 Flash hardware protection will not be activated. 1 Flash hardware protection will be activated. Note: For ROM devices, this bit refers to protection from accidental erase of D- Flash, i.e. DFLASHEN bit must be set to 1 prior to each erase operation. This password field must be a non-zero value. Note: For ROM devices, bits 5 to 7 are not applicable and should be written with zeros. Application Note 7 V1.0, 2006-07

Memory Protection Scheme BSL mode 6, which is used for enabling memory protection, can also be used for disabling memory protection for the Flash device. Here, the programmed password must be provided by the user. A password match triggers an automatic erase of the protected P-Flash and D-Flash contents, including the programmed password. The memory protection is then disabled upon the next reset. For the ROM device, the ROM is protected at all times and BSL mode 6 is used only to block external access to the device. However, unlike the Flash device, it is not possible to disable the memory protection of the ROM device. Here, entering BSL mode 6 will result in a protection error. Application Note 8 V1.0, 2006-07

3 Memory Protection Configurations Memory Protection Configurations To enable a smooth migration from Flash device to the ROM device, user is strongly encouraged to follow the suggestions shown in Table 4, Table 5 and Table 6 for the various code sizes. A different usage other than the recommendations below should be clarified with Infineon Technologies. For code size less than or equal to 24 Kbytes, the recommended password bits [7:4] setting is shown in Table 4. This setting ensures full compatibility between Flash and ROM device. Table 4 Recommendation For Code Size 24 Kbytes Protection Flash Device ROM Device Recommended setting of 0XX1 B 0001 B Password bits [7:4] Disabling of Memory Protection (During Software Upgrade) Read Protection Program Protection Erase Protection All P-Flash banks will be erased. Erase of D-Flash bank(s) depends on bits 5 to 7. See Table 3. P-Flash contents cannot be read from other address spaces including D-Flash. D-Flash contents can be read from any address space. P-Flash banks cannot be D-Flash banks can be P-Flash banks cannot be erased. D-Flash banks can be erased if DFLASHEN bit is set to 1 prior to each erase operation. It is not possible to disable the memory protection in ROM devices. ROM contents can be read only by itself. D-Flash contents can be read from any address space. D-Flash bank can be D-Flash bank can be erased if DFLASHEN bit is set to 1 prior to each erase operation. Application Note 9 V1.0, 2006-07

Memory Protection Configurations For code size greater than 24 Kbytes, the recommended password bits [7:4] setting is shown in Table 5. It is required that all of the code in the Flash device is located inside the ROM for compatibility. Table 5 Recommendation For Code Size > 24 Kbytes Protection Flash Device ROM Device Recommended setting of XXX0 B 0000 B Password bits [7:4] Disabling of Memory Protection (During Software Upgrade) Read Protection Program Protection Erase Protection All P-Flash banks will be erased. Erase of D-Flash bank(s) depends on bits 5 to 7. See Table 3. Flash contents can be read from any address space. All Flash banks can be All Flash banks can be erased regardless of the value of DFLASHEN bit. It is not possible to disable the memory protection in ROM devices. ROM contents can be read only by itself. D-Flash contents can be read from any address space. D-Flash bank can be D-Flash bank can be erased regardless of the value of DFLASHEN bit. Application Note 10 V1.0, 2006-07

Memory Protection Configurations For code size equal to 32 Kbytes, there is no compatible configuration in the ROM device as the Flash memory can always be programmed and erased. However, if all 32-byte of Flash contents can be moved to ROM, i.e. there is no D-Flash needed in the ROM device, the password bits [7:4] setting shown in Table 6 may be used for compatibility. Table 6 Recommendation For Code Size = 32 Kbytes Protection Flash Device ROM Device Recommended setting of 1XX1 B 000X B Password bits [7:4] Disabling of Memory Protection (During Software Upgrade) Read Protection Program Protection Erase Protection All Flash banks will be erased. Flash contents can be read from any Flash address space. All Flash banks cannot be All Flash banks cannot be erased regardless of the value of DFLASHEN bit. It is not possible to disable the memory protection in ROM devices. ROM contents can be read only by itself. D-Flash contents can be read from any address space. D-Flash bank can be D-Flash bank can be erased. If bit 4 of password is 1, DFLASHEN needs to be set prior to each erase operation. Note: In the ROM device, the ROM contents are always read protected regardless of password setting. If user still needs to read ROM contents during execution from D-Flash or XRAM, user needs to put a function in the ROM to be able to read the entire ROM content. Application Note 11 V1.0, 2006-07

www.infineon.com Published by Infineon Technologies AG