54
CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
Supervisory ROM (SROM)
3.1.2.11
Calibrate1 Function
While the Calibrate1 function is a completely separate func-
tion from Calibrate0, they perform the same task, 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 calibration
data and, if that checksum is determined as invalid,
Calibrate1 causes a
by generating an inter-
nal 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 are 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 subfunction of SWBootReset
and the Calibrate1 function code was added to provide
. For more information on how Calibrate1
works, see the
“SWBootReset Function” on page 50
This function may be executed at any time to set all calibra-
tion values back to their 5-V values. However, it is unneces-
sary to call this function. This function is simply documented
for completeness. This function has no argument to select
between 5-V and 3.3-V calibration values; therefore, it
always defaults to 5-V values. 3.3-V calibration values are
accessed by way of the TableRead function, which is
described in the section titled
3.1.2.12
WriteAndVerify Function
The WriteAndVerify function works exactly the same as the
WriteBlock function with one exception. When the write
operation has completed, the SROM will then read back the
contents of Flash and compare those values against the val-
ues in SRAM thus verifying that the write was successful.
The write and verify is one SROM operation; therefore, the
SROM is not exited until the verify is completed.
The parameters for this block are identical to the WriteBlock
(see
“WriteBlock Parameters (02h)” on page 52
). If the verify
operation fails, the 0x04 error code is returned at SRAM
address 0xF8. If the write fails, the 0x01 error code returns
at SRAM address 0xF8.
3.2
Register Definitions
3.2.1
FLS_PR1 Register
The Flash Program Register 1 (FLS_PR1) is used to specify
which Flash bank should be used for SROM operations.
Note
This register has no effect on products with one Flash
bank. Refer to the table titled
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
Table 3-15. WriteAndVerify Parameters (0Ah)
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
Flash block number.
POINTER
0,FBh
RAM
First of 64 addresses in SRAM, where
the data to be stored in Flash is located
prior to calling WriteBlock.
CLOCK
0,FCh
RAM
Clock divider used to set the write pulse
width.
DELAY
0,FEh
RAM
For a CPU speed of 12 MHz set to 56h.
Address
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Access
1,FAh
Bank
RW : 00
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...