PSoC CY8CTMG20x and CY8CTST200 TRM, Document No. 001-53603 Rev. *C
33
3. Supervisory ROM (SROM)
This chapter discusses the Supervisory ROM (SROM) functions. For a quick reference of all PSoC registers in address order,
refer to the
Register Reference chapter on page 187
.
3.1
Architectural Description
The SROM holds code that boots a PSoC device, calibrates
circuitry, and performs Flash operations. The functions pro-
vided by the SROM are called from code stored in the Flash
or by device programmers.
The SROM is used to boot the part and provide interface
functions to the Flash blocks. (
Table 3-1
lists the SROM
functions.) The SROM functions are accessed by executing
the Supervisory System Call instruction (
SSC
), which has an
opcode of 00h. Before executing the
SSC
, the M8C's accu-
mulator needs to load with the wanted SROM function code
from
Table 3-1
.
Attempting to access undefined functions (Reserved func-
tions) causes a
HALT
. The SROM functions execute code
with calls; therefore, the functions require stack space. With
the exception of Reset, all of the SROM functions have a
parameter block in SRAM that you must configure before
executing the
SSC
.
Table 3-2
lists all possible parameter block variables. The
meaning of each parameter, with regards to a specific
SROM function, is described later in this chapter. Because
the
SSC
instruction clears the CPU_F PgMode bits, all
parameter block variable addresses are in SRAM Page 0.
The CPU_F value is automatically restored at the end of the
SROM function.
The MVR_PP and the MVW_PP pointers are not disabled
by clearing the CPU_F PgMode bits. Therefore, the
POINTER parameter is interpreted as an address in the
page indicated by the
MVI
page pointers, when the supervi-
sory operation is called. This allows the data buffer used in
the supervisory operation to be located in any SRAM page.
(See the
for more details
regarding the MVR_PP and MVW_PP pointers.)
Note
ProtectBlock and EraseAll (described on page
) SROM functions are
not listed in the table above because they are dependent on external pro-
gramming.
Note
CLOCK and DELAY are ignored and are reserved for future use.
Two important variables that are used for all functions are
KEY1 and KEY2. These variables are used to help discrimi-
nate between valid
SSCs
and inadvertent
SSCs
. KEY1 must
always have a value of 3Ah, while KEY2 must have the
same value as the stack pointer when the SROM function
begins execution. This is the SP (Stack Pointer) value when
the
SSC
opcode is executed, plus three. For all SROM func-
tions except SWBootReset, if either of the keys do not
match the expected values, the M8C halts. The SWBootRe-
set function does not check the key values. It only checks to
see if the accumulator's value is 0x00.
Table 3-1. List of SROM Functions
Function Code
Function Name
Required
Stack Space
Page
00h
SWBootReset
0
01h
ReadBlock
7
02h
WriteBlock
7
03h
EraseBlock
5
06h
TableRead
3
07h
CheckSum
4
08h
Calibrate0
4
09h
Calibrate1
3
0Ah
WriteAndVerify
7
0Fh
HWBootReset
3
Table 3-2. SROM Function Variables
Variable Name
SRAM Address
KEY1/RETURN CODE
0,F8h
KEY2
0,F9h
BLOCKID
0,FAh
POINTER
0,FBh
CLOCK
0,FCh
Reserved
0,FDh
DELAY
0,FEh
Reserved
0,FFh
Содержание PSoC CY8CTMG20 Series
Страница 4: ...4 Contents Overview Feedback...
Страница 26: ...26 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section B PSoC Core Feedback...
Страница 54: ...54 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Interrupt Controller Feedback...
Страница 62: ...62 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C General Purpose I O GPIO Feedback...
Страница 82: ...82 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Sleep and Watchdog Feedback...
Страница 134: ...134 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C I2C Slave Feedback...
Страница 142: ...142 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C System Resets Feedback...
Страница 160: ...160 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C SPI Feedback...
Страница 182: ...182 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Full Speed USB Feedback...
Страница 186: ...186 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section E Registers Feedback...
Страница 302: ...302 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Glossary Feedback...