21 HW Processor (HWP) and Sound Output
S1C31D50/D51 TECHNICAL MANUAL
Seiko Epson Corporation
21-17
(Rev. 2.00)
Terminating memory check
The following shows the procedure to terminate the memory check being executed.
1. Confirm that the STATE.STATE[15:0] bits = 0x0002 to 0x0005 (during memory check).
2. Confirm that the STATUS.READY bit = 1.
(Command acceptable)
3. Set the COMMAND.COMMAND[7:0] bits to 0xff.
(Select Memory Check Stop command)
4. Write 1 to the HWPCMDTRG.HWP0TRG bit.
(Trigger to issue command)
5. Wait until the HWPINTF.HWP0IF bit is set to 1 (interrupt).
(Occurrence of state transition)
6. Confirm that the STATE.STATE[15:0] bits = 0x0001 (mc_state_idle).
7. Write 0 to the HWPINTF.HWP0IF bit.
(Clear interrupt flag)
Memory check error
When an error occurs during processing of the memory check function, the HWPINTF.HWP1IF bit is set to 1 (an
interrupt can be generated). The error contents can be confirmed by reading the ERROR.ERROR[15:0] bits. As
shown in Table 21.4.2.2, the ERROR.ERROR
x
bit corresponding to the error that has occurred is set to 1.
Table 21.4.2.2 List of Memory Check Errors
ERROR.ERROR[15:0] bits
Error
Meaning
0000 0000 0000 0000
error_no_error
No error has occurred.
Non-fatal error
xxxx xxxx xxxx xxx1 (bit 0) error_command
A command that is undefined or is ineffective in the cur-
rent state has been specified.
Fatal error
x1xx xxxx xxxx xxxx (bit 14) error_function_id
An undefined function ID has been specified.
1xxx xxxx xxxx xxxx (bit 15) error_others
Another error has occurred.
When a non-fatal error has occurred, reissue a valid command.
When a fatal error has occurred, remove the cause of error and redo the processing from initialization.
21.5 Interrupts
The HWP has a function to generate the interrupts shown in Table 21.5.1.
Table 21.5.1 HWP Interrupt Function
Interrupt
Interrupt flag
Set condition
Clear condition
Error occurrence HWPINTF.HWP1IF When a sound play error (see Table 21.4.1.2) or a memory
check error (see Table 21.4.2.2) has occurred
Writing 0.
State transition HWPINTF.HWP0IF When a state transition of which the interrupt has not been
masked occurs
Writing 0.
Interrupt enable
To enable HWP interrupts, the HWPINTE.HWPIE bit must be set to 1. An interrupt request is sent to the CPU
core only when the interrupt flag is set in this status. For more information on interrupt control, refer to the “In-
terrupt” chapter.
State transition interrupt mask
The HWP provides a HWP internal register that contains the interrupt mask bits used for setting whether to set
the HWPINTF.HWP0IF bit (to generate an interrupt) or not when a state transition occurs. By setting the inter-
rupt mask bits to 1, an interrupt can be generated when the corresponding state transition occurs.
Table 21.5.2 State Transition Interrupt Mask Bits
Function
Interrupt mask bit
State transition
Sound play
INTMASK.TO_MUTE
sp_state_play state
→
sp_state_mute state
INTMASK.TO_PAUSE
sp_state_play state
→
sp_state_pause state
INTMASK.TO_PLAY
sp_state_idle, mute, pause state
→
sp_state_play state
INTMASK.TO_IDLE
sp_state_init, mute, pause, play state
→
sp_state_idle state
Memory check INTMASK.TO_PROCESSING mc_state_idle state
→
mc_state_ram_rw, ram_march_c, checksum, crc state
INTMASK.TO_IDLE
mc_state_init, mc_state_ram_rw, ram_march_c, checksum, crc state
→
mc_state_
idle state