AN-1153| Application Note

AN-1153 PDF

AN-1153| Application Note


COP8 Flash ISP Handbook Virtual E2 Guide

COP8TM Flash ISP HANDBOOK Virtual E2 Guide
ABSTRACT This application note describes the COP8 Virtual E2 Methodology. Emulated E2 allows the programmer to treat flash memory as if it were E2. INTRODUCTION The following appnote describes the setup and use of an emulated E2. This is also known as Virtual E2. This method of storage utilizes non-volatile memory. Detailed macros utilizing Virtual E2 routines are included in this application note. INTRODUCTION TO THE VIRTUAL E2 CONCEPT The Virtual E2 concept arose from the need to have E2 PROM peripheral on a microcontroller. It is a natural extension of the COP8 Flash Family Boot ROM firmware. There are user accessible Virtual E2 entry points contained in the COP8 Flash Family Boot ROM. An implementation example is shown in Figure 1. 1.0 2.0 MEMORY PARTITONING BETWEEN VIRTUAL E2, RAM, AND FLASH In order to use Virtual E2, the COP8 Flash Family device should be split up into two partitions. Partition one is responsible for updating to the flash. This is where the software will use the Virtual E2 entry point
s. Partition two is where the data to be modified is located. Section two may be data memory or it may be program memory or it may be a mixture of both. The same partitioning scheme must be implemented on the RAM side.

National Semiconductor Application Note 1153 Thinh Ha February 2002

validity of the ISP Address and the BYTECOUNTHI register. Data transfers will take place from whatever RAM locations are specified by the segment and BYTECOUNTLO registers. 3.1 JSRB LABELS For Virtual E2 Routines Entry points for the Virtual E2 routines are shown in Table 1. TABLE 1. Virtual E2 Entry Points and Their Associated Labels Command/Labels ve2pgerase ve2readbf ve2blockr ve2writebf ve2blockw ROM Address 0x17 0x11 0x26 0x14 0x23

To execute commands listed in Table 1, the JSRB instruction must be used. In order for correct behavior to occur, a "KEY" must be set prior to executing the JSRB instruction. The PGMTIM register must also be set prior to any write or erase commands. It is up to the user to enforce security when using these commands.

AN101255-1

FIGURE 1. Sample Virtual E2 Partition Arrangement VIRTUAL E2 SUPPORT BLOCKS This section deals with the Virtual E2 Support Block. Entry point locations are shown in Table 1. Registers are shown in Table 3. In addition, each description contains details about security dependencies. There are no checks made for the 3.0
COP8TM and WATCHDOGTM are trademarks of National Semiconductor Corporation. IBM is a registered trademark of International Business Machines Corp. Windows is a registered trademark of Microsoft Corporation.

AN-1153

2002 National Semiconductor Corporation

AN101255

www.national.com


AN-1153 Application Note national Download PDF

Add this permalink to your bookmarks for future download of AN-1153 ApplicationNote

Permalink: http://application.emcelettronica.com/national/AN-1153

PDF AN-1153 APPLICATION NOTE