
50
Document # 001-20559 Rev. *D
Supervisory ROM (SROM)
3.1.2.8
Checksum Function
The Checksum function calculates a 16-bit checksum over a
user specifiable number of blocks, within a single
starting at block zero. The BLOCKID parameter is
used to pass in the number of blocks to checksum. A
BLOCKID value of '1' calculates the checksum of only block
0, a BLOCKID of '2' calculates the checksum of block 0 and
block 1, and so on. A BLOCKID value of '0' calculates the
checksum of the entire flash bank. Note that if the BLOCKID
is greater than the number of blocks that the device has in a
flash bank, the function calculates the checksum for the
entire flash bank and repeats the checksum process again
from block 0 in that flash bank. For example, for the
CY8C24533 device, if the BLOCKID is equal to 150, the
function calculates checksum for block 0 to block 127 and
again for block 0 to block 21.
The 16-bit checksum is returned in KEY1 and KEY2. The
parameter KEY1 holds the lower 8 bits of the checksum and
the parameter KEY2 holds the upper 8 bits of the checksum.
For devices with multiple Flash banks, the checksum func-
tion must be called once for each Flash bank. The SROM
Checksum function operates on the Flash bank indicated by
the Bank bit in the FLS_PR1 register.
3.1.2.9
Calibrate0 Function
The Calibrate0 function transfers the calibration values
stored in a special area of the Flash to their appropriate reg-
isters. This function may be executed at any time to set all
calibration values back to their 5V values. However, it
should not be necessary to call this function. This function is
simply documented for completeness. 3.3V calibration val-
ues are accessed by way of the TableRead function, which
is described in the section titled
.
3.1.2.10
Calibrate1 Function
While the Calibrate1 function is a completely separate func-
tion from Calibrate0, they perform the same function, which
is to transfer the calibration values stored in a special area
of the Flash to their appropriate registers. What is unique
about Calibrate1 is that it calculates a checksum of the cali-
bration data and, if that checksum is determined to be
invalid, Calibrate1 causes a
by generating
an internal reset. If this occurs, it is indicated by setting the
Internal Reset Status bit (IRESS) in the CPU_SCR1 register.
The Calibrate1 function uses SRAM to calculate a check-
sum of the calibration data. The POINTER value is used to
indicate the address of a 30-byte buffer used by this func-
tion. When the function completes, the 30 bytes is set to
00h.
An MVI A, [expr] and an MVI [expr], A instruction are used to
move data between SRAM and Flash. Therefore, the MVI
write pointer (MVW_PP) and the MVI read pointer
(MVR_PP) must be specified to the same SRAM page to
control the page of RAM used for the operations.
Calibrate1 was created as a sub-function of SWBootReset
and the Calibrate1 function code was added to provide
. For more information on how Calibrate1
works, see the SWBootReset section.
This function may be executed at any time to set all calibra-
tion values back to their 5V values. However, it should not
be necessary to call this function. This function is simply
documented for completeness. This function has no argu-
ment to select between 5V and 3.3V calibration values;
therefore, it always defaults to 5V values. 3.3V calibration
values are accessed by way of the TableRead function,
which is described in the section titled
.
Table 3-12. Checksum Parameters (07h)
Name
Address
Type
Description
KEY1
0,F8h
RAM
3Ah.
KEY2
0,F9h
RAM
Stack Pointer value+3, when SSC is
executed.
BLOCKID
0,FAh
RAM
Number of Flash blocks to calculate
checksum on.
FLS_PR1
1,FAh
Register
Flash bank number.
Table 3-13. Calibrate0 Parameters (08h)
Name
Address
Type
Description
KEY1
0,F8h
RAM
3Ah
KEY2
0,F9h
RAM
Stack Pointer value+3, when SSC is
executed.
Table 3-14. Calibrate1 Parameters (09h)
Name
Address
Type
Description
KEY1
0,F8h
RAM
3Ah
KEY2
0,F9h
RAM
Stack Pointer value+3, when SSC is
executed.
POINTER
0,FBh
RAM
First of 30 SRAM addresses used by
this function.
MVR_PP
0,D4h
Register
MVI write page pointer.
MVW_PP
0,D5h
Register
MVI read page pointer.
Summary of Contents for PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...