21 HW Processor (HWP) and Sound Output
21-14
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
1) hwp_sleep
After the MCU boots up, the HWP enters this state (HWPCTL.HWPEN bit = 0). In this state, the clock supply
to the HWP stops. By setting the HWPCTL.HWPEN bit to 1 after configuring the memory check function reg-
isters as shown in “Initialization” above, the HWP transits to mc_state_init state.
2) mc_state_init
After the HWPCTL.HWPEN bit is set to 1, the HWP enters this state and initializes the internal circuit accord-
ing to the settings of the memory check function registers. Upon completion of the initial processing, the HWP
transits to mc_state_idle state.
3) mc_state_idle
This is the state in which the memory check function is idle. This state allows issuance of a memory check
command. After a memory check command is issued, the HWP transits to a state from 4) to 7) to start memory
check.
4) mc_state_ram_rw
This is the state in which the HWP is performing the RAM read/write check. When the RAM Check R/W Start
command is issued in mc_state_idle state, the HWP transits to this state. When the check has completed or the
Memory Check Stop command is issued, the HWP returns to mc_state_idle state.
5) mc_state_ram_march_c
This is the state in which the HWP is performing the RAM check using the March-C algorithm. When the
RAM Check March-C Start command is issued in mc_state_idle state, the HWP transits to this state. When the
check has completed or the Memory Check Stop command is issued, the HWP returns to mc_state_idle state.
6) mc_state_checksum
This is the state in which the HWP is performing the Flash memory check that calculates the checksum. When
the Flash Checksum Start command is issued in mc_state_idle state, the HWP transits to this state. When the
check has completed or the Memory Check Stop command is issued, the HWP returns to mc_state_idle state.
7) mc_state_crc
This is the state in which the HWP is performing the Flash memory check that calculates the CRC. When the
Flash CRC Start command is issued in mc_state_idle state, the HWP transits to this state. When the check has
completed or the Memory Check Stop command is issued, the HWP returns to mc_state_idle state.
The current operating state can be monitored by reading the STATE.STATE[15:0] bits (except hwp_sleep). Fur-
thermore, an interrupt can be generated when a state transition to the designated state occurs.
Memory check commands
Table 21.4.2.1 lists the memory check function commands.
Table 21.4.2.1 List of Memory Check Commands
Command
Function
Issuable state
Transit destination state
RAM Check R/W Start
Start RAM check (read/write)
mc_state_idle
mc_state_ram_rw
RAM Check March-C Start Start RAM check (March-C)
mc_state_idle
mc_state_ram_march_c
Flash Checksum Start
Start Flash check (checksum)
mc_state_idle
mc_state_checksum
Flash CRC Start
Start Flash check (CRC)
mc_state_idle
mc_state_crc
Memory Check Stop
Stop memory check
mc_state_ram_rw,
mc_state_ram_march_c,
mc_state_checksum,
mc_state_crc
mc_state_idle
The memory check start command can be issued only in mc_state_idle state.
Follow the procedure below to issue a command.
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.
(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))