Texas Instruments MSC1210 User Manual
Page 187
Hardware Configuration
15-5
Advanced Topics
15.1.2 Hardware Configuration Memory
In addition to the hardware configuration registers, 116 bytes of configuration
memory are available to you for your own use. This configuration memory, also
set during device programming, can hold information such as unique serial
numbers, parameters, or any other information that you want to record. The
configuration information is available to the program when the part is operating
for read operations, but cannot be changed.
Setting the configuration memory is accomplished in the same way as setting
the hardware configuration registers as described above—the only difference
is that the configuration memory available is located from 8002
H
through
806F
H
. Thus, the first five bytes of your configuration memory could be set with
assembly code such as the following:
CSEG AT 8002H
;Address of user configuration memory
DB 10h,20h,30h,40h,50h
;User configuration data, up to 116 bytes
Be careful that the configuration data is located at 8002
H
and includes no more
than 116 bytes of data. Including more than 116 bytes of configuration data
causes the data to spill over into the area of configuration memory that is used
to configure the actual MSC1210 hardware.
15.1.3 Accessing Configuration Memory in a User Program
The 128 bytes of flash configuration memory, which include the 116 bytes of
user-defined configuration data and two bytes of hardware configuration regis-
ters, can be read by your program in normal operation. However, the configu-
ration data is not obtained by reading the code address to which they were pro-
grammed. That is to say, although flash configuration memory is set at pro-
gram time by placing it at code memory addresses 8002
H
through 806F
H
(user
configuration memory) and 807E
H
and 807F
H
(hardware configuration), the
data cannot be read by reading the data from that program memory address.
Rather, two SFRs are used to read the configuration memory.
In code, your program may set the configuration address register SFR,
CADDR (93
H
), to the address of the byte of configuration memory that should
be read. The address must be a value between 00
H
and 7F
H
reflecting the 128
bytes of configuration flash memory. Once the address is set in CADDR, the
value of that address can then be read by reading the CDATA (94
H
) SFR.
Note:
You may not write to the CADDR SFR if the code is executing from flash
memory. This is because that would imply that the MSC1210 fetch the flash
configuration memory at the same time as it is fetching instructions from flash
memory.
To read flash configuration memory, a call must be made to the 2k Boot ROM
that is included on the MSC1210. A call to the faddr_data_read function, pass-
ing it the address as a parameter, will return the value of the configuration
memory address.