English
Language : 

C167CS Datasheet, PDF (478/517 Pages) Infineon Technologies AG – 16-Bit Single-Chip Microcontroller
C167CS
Derivatives
System Programming
22.10 Handling the Internal Code Memory
The Mask-ROM/OTP/Flash versions of the C167CS provide on-chip code memory that
may store code as well as data. The lower 32 KByte of this code memory are referred to
as the “internal ROM area”. Access to this internal ROM area is controlled during the
reset configuration and via software. The ROM area may be mapped to segment 0, to
segment 1 or the code memory may be disabled at all.
Note: The internal ROM area always occupies an address area of 32 KByte, even if the
implemented mask ROM/OTP/Flash memory is smaller than that (e.g. 8 KByte).
Of course the total implemented memory may exceed 32 KBytes.
Code Memory Configuration During Reset
The control input pin EA (External Access) enables the user to define the address area
from which the first instructions after reset are fetched. When EA is low (‘0’) during reset,
the internal code memory is disabled and the first instructions are fetched from external
memory. When EA is high (‘1’) during reset, the internal code memory is globally
enabled and the first instructions are fetched from the internal memory.
Note: Be sure not to select internal memory access after reset on ROMless devices.
Mapping the Internal ROM Area
After reset the internal ROM area is mapped into segment 0, the “system segment”
(00’0000H … 00’7FFFH) as a default. This is necessary to allow the first instructions to
be fetched from locations 00’0000H ff. The ROM area may be mapped to segment 1
(01’0000H … 01’7FFFH) by setting bit ROMS1 in register SYSCON. The internal ROM
area may now be accessed through the lower half of segment 1, while accesses to
segment 0 will now be made to external memory. This adds flexibility to the system
software. The interrupt/trap vector table, which uses locations 00’0000H through
00’01FFH, is now part of the external memory and may therefore be modified, i.e. the
system software may now change interrupt/trap handlers according to the current
condition of the system. The internal code memory can still be used for fixed software
routines like IO drivers, math libraries, application specific invariant routines, tables, etc.
This combines the advantage of an integrated non-volatile memory with the advantage
of a flexible, adaptable software system.
User’s Manual
22-16
V2.0, 2000-07