21 HW Processor (HWP) and Sound Output
21-16
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
Flash check
The following shows the procedure to execute a Flash check:
1. Confirm that the STATE.STATE[15:0] bits = 0x0001 (mc_state_idle).
2. Confirm that the STATUS.READY bit = 1.
(Command acceptable)
3. Set the COMMAND.COMMAND[7:0] bits to 0x04 or 0x05.*
(Select command)
4. Set the MEMADDR.ADDRESS[31:0] bits.
(Specify check start address)
5. Set the MEMSIZE.SIZE[31:0] bits.
(Specify check size (byte))
6 Set the INITVALUE.INITVALUE[31:0] bits to 0x00000000.
(Specify Flash check initial value)
7. Write 1 to the HWPCMDTRG.HWP0TRG bit.
(Trigger to issue command)
8. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
(Occurrence of state transition)
The HWP starts the memory check from this point.
9. Confirm that the STATE.STATE[15:0] bits = 0x0004 (mc_state_checksum) or 0x0005 (mc_state_crc) as
necessary.*
10. Write 0 to the HWPINTF.HWP0IF bit.
(Clear interrupt flag)
:
The memory check is in progress.
:
11. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
(Occurrence of state transition)
The memory check is completed at this point.
12. Confirm that the STATE.STATE[15:0] bits = 0x0001 (mc_state_idle).
13. Write 0 to the HWPINTF.HWP0IF bit.
(Clear interrupt flag)
14. Confirm that the STATUS.PROCESSING[1:0] bits = 0x2 (check completed).
15. Read the RESULT.RESULT[31:0] bits.
(Confirm check result)
These bits hold the checksum or CRC calculation result.
16. Compare the read calculation result with the original value.
*
Two Flash check commands are available. Setting the COMMAND.COMMAND[7:0] bits to 0x04 selects
the Flash Checksum Start command; setting to 0x05 selects the Flash CRC Start command.
Flash Checksum Start command
When this command is issued by the trigger bit, the HWP transits to mc_state_checksum state to calculate
the checksum from the specified Flash data.
Flash CRC Start command
When this command is issued by the trigger bit, the HWP transits to mc_state_crc state to calculate the
CRC from the specified Flash data.
Note: The HWP uses memory mapped access mode (refer to the “Quad Synchronous Serial Interface”
chapter) for the external QSPI-Flash check. Therefore, external Flash memories that do not sup-
port XIP (eXecute-In-Place) cannot be checked.