MS51
Nov. 28, 2019
Page
28
of 491
Rev 1.00
MS51
32K
SE
RIES
TE
CHNICAL RE
F
EREN
CE MA
N
UAL
6.1.3
Data Flash Memory
MS51 Series Data Flash is shared with APROM or LDROM. Any page of APROM or LDROM can be
used as non-volatile data Flash storage and size no need special configuration. The base address of
Data Flash is determined by applying IAP, For IAP details, please see Chapter 6.3.1In-Application-
Programming (IAP). All of embedded Flash memory is 128 bytes per page erased.
6.1.4
Security Protection Memory (SPROM)
The security protection memory (SPROM) is used to store instructions for security application. The
SPROM includes 128 bytes at location address FF80H ~ FFFFH and doesn
’t support “whole chip
erase command”. Figure 6.1-2 SPROM Memory Mapping And SPROM Security Mode shows that the
last byte of SPROM (address: FFFFH) is used to identify the SPROM code is non-secured or secured
mode.
0000H
CHPCON[1] BS = 0
APROM
32K bytes
7FFFH
SPROM
FFFFH
FF80H
SPROM
Non-security mode
SPROM
Security mode
FF80H
FFFFH
FFFEH
0xFF
Others
Figure 6.1-2 SPROM Memory Mapping And SPROM Security Mode
(1) SPROM non-secured mode (the last byte is 0xFF). The access behavior of SPROM is the same
with APROM and LDROM. All area can be read by CPU or ISP command, and can be erased and
programmed by ISP command.
(2) SPROM secured mode (the last byte is not 0xFF). In order to conceal SPROM code in secured
mode, CPU only can perform instruction fetch and get data from SPROM when CPU is run at SPROM
area. Otherwise, CPU will get all 00H for data access. In order to protect SPROM, the CPU instruction
fetch will also get zero value when ICE (OCD) port is connected in secured code. At this mode,
SPROM doesn
’t support ISP program, read or erase.
6.1.5
CONFIG bytes
The MS51 has several hardware configuration bytes, called CONFIG, those are used to configure the
hardware options such as the security bits, system clock source, and so on. These hardware options
can be re-configured through the parallel Writer, In-Circuit-Programming (ICP), or In-Application-
Programming (IAP). Several functions, which are defined by certain CONFIG bits are also available to
be re-configured by SFR. Therefore, there is a need to load such CONFIG bits into respective SFR
bits. Such loa
ding will occur after resets. These SFR bits can be continuously controlled via user’s
software.
CONFIG bits marked as “-“should always keep un-programmed.