Browse Prior Art Database

Vector Redirection in a Block Protected Nonvolatile Memory

IP.com Disclosure Number: IPCOM000005378D
Original Publication Date: 2001-Sep-18
Included in the Prior Art Database: 2001-Sep-18
Document File: 5 page(s) / 68K

Publishing Venue

Motorola

Related People

James M. Sibigtroth: AUTHOR [+4]

Abstract

A new mechanism allows all interrupt vectors other than the reset vector to be redirected when the block of nonvolatile memory containing the vectors is block protected. The vector redirection is done transparently in hardware logic. With this mechanism the user can program the reset vector locations (in their normal location at $FFFE:FFFF) to point at a bootloader program located in the same block of memory. Then the nonvolatile control bits, that control block protection, can be written to prevent programming or erasure of the bootloader and reset vector. Another nonvolatile control bit determines whether the interrupt vectors in the protected block will be automatically redirected to locations in unprotected memory space adjacent to the protected block. For example, if the block from $F800 through $FFFF is protected, any interrupt would fetch its vector from the area $F7C0 through $F7FD. If the block from $F000 through $FFFF is protected, any interrupt would fetch its vector from the area $EFC0 through EFFD. When vectors are redirected, the locations usually used for vectors ($FFC0 through $FFFD) are available for the bootloader program. Since interrupt vectors are now located in unprotected space, there is no additional space or execution time penalty associated with run-time interrupt operations.

This text was extracted from a Microsoft Word 97 document.
This is the abbreviated version, containing approximately 44% of the total text.

Vector Redirection in a Block Protected Nonvolatile Memory

James M. Sibigtroth

Michael C. Wood

George L. Espinor

Roberto M. Frontera

Abstract: A new mechanism allows all interrupt vectors other than the reset vector to be redirected when the block of nonvolatile memory containing the vectors is block protected. The vector redirection is done transparently in hardware logic. With this mechanism the user can program the reset vector locations (in their normal location at $FFFE:FFFF) to point at a bootloader program located in the same block of memory. Then the nonvolatile control bits, that control block protection, can be written to prevent programming or erasure of the bootloader and reset vector. Another nonvolatile control bit determines whether the interrupt vectors in the protected block will be automatically redirected to locations in unprotected memory space adjacent to the protected block. For example, if the block from $F800 through $FFFF is protected, any interrupt would fetch its vector from the area $F7C0 through $F7FD. If the block from $F000 through $FFFF is protected, any interrupt would fetch its vector from the area $EFC0 through EFFD. When vectors are redirected, the locations usually used for vectors ($FFC0 through $FFFD) are available for the bootloader program. Since interrupt vectors are now located in unprotected space, there is no additional space or execution time penalty associated with run-time interrupt operations.

Problem: In some applications it is desirable to program a bootloader or kernel program into the high address block of the flash memory and then block protect this program so that no user action including a program error can corrupt the bootloader accidentally. When any high flash block is protected, the interrupt and reset vectors ($FFC0-FFFF) and the nonvolatile bits that get transferred to working registers (at $18xx) are also protected. Because there is no way to predict where the interrupt service routines will ultimately be located, interrupts must employ a pseudo-vector mechanism in software to redirect processing based on a pseudo-vector in non-protected space. This is costly in terms of code space (about 150 bytes) and execution time, which adversely affects interrupt latency.

Solution: A hardware logic solution for this problem has been devised for a derivative of the Motorola 68HC08 family of flash-based microcontrollers. The logic will be added to a flash memory module. This nonvolatile flash memory module already included nonvolatile control bits and circuitry that allow a user to block protect a variable size block of this memory to prevent accidental programming or erase operations in this area of memory. An MCU modified according to this mechanism responds to interrupts by fetching the interrupt vector from an alternate location in unprotected memory space. The redirected vector fetch has the same timing as a vector fetch that is not redirected. When alternate vector locations are in use, the origina...