21 HW Processor (HWP) and Sound Output
21-12
Seiko Epson Corporation
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
When the playback output is resumed, a smoothing (fade-in) process for the playback output signal is car-
ried out to suppress the occurrence of noise due to a sudden rise of the signal. (See Figure 21.4.1.4.)
Terminating playback
In the playback state (sp_state_play), pause state (sp_state_pause), and mute state (sp_state_mute), the play-
back can be terminated to return the state to the idle state (sp_state_idle) with the procedure shown below.
1. Confirm that the STATE_
n
.STATE[15:0] bits = 0x0002 (sp_state_play), 0x0003 (sp_state_pause), or
0x0004 (sp_state_mute).
2. Confirm that the STATUS.READY bit = 1.
(Command acceptable)
3. Set the COMMAND_
n
.COMMAND[7:0] bits to 0x02 or 0x03.*
(Select Sound 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)
The HWP enters the idle state at this point.
6. Confirm that the STATE_
n
.STATE[15:0] bits = 0x0001 (sp_state_idle) as necessary.
7. Write 0 to the HWPINTF.HWP0IF bit.
(Clear interrupt flag)
*
Two playback terminate commands are available. Setting the COMMAND_
n
.COMMAND[7:0] bits to 0x02
selects the Sound Stop Immediately command; setting to 0x03 selects the Sound Stop after Current Phrase
command.
Sound Stop Immediately command
When this command is issued by the trigger bit, the playback output is terminated immediately. At this
time, a smoothing (fade-out) process for the playback output signal is carried out to suppress the occurrence
of noise. (See Figure 21.4.1.2.)
Sound Stop after Current Phrase command
The playback output is terminated after ending the phrase that is being output when the command is issued.
(See Figure 21.4.1.3.)
In the pause or mute state, the playback is terminated by releasing the pause or mute state immediately re-
gardless of which of the Sound Stop commands is issued.
Sound play error
When an error occurs during processing of the sound play 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.1.2, the ERROR.ERROR
x
bit corresponding to the error that has occurred is set to 1.
Table 21.4.1.2 List of Sound Play 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_ch0_command
A command that is undefined or is ineffective in the cur-
rent state has been specified in Ch.0.
xxxx xxxx xxxx xx1x (bit 1) error_ch1_command
A command that is undefined or is ineffective in the cur-
rent state has been specified in Ch.1.
xxxx xxxx xxxx x1xx (bit 2) error_ch0_sentence_no An invalid sentence number has been specified in Ch.0.
xxxx xxxx xxxx 1xxx (bit 3) error_ch1_sentence_no An invalid sentence number has been specified in Ch.1.
xxxx xxxx 1xxx xxxx (bit 7) error_sdac_overflow
An overflow has occurred in the SDAC output signal.
Fatal error
xxxx xxx1 xxxx xxxx (bit 8) error_ch0_decode
Invalid sound data has been read in Ch.0.
xxxx xx1x xxxx xxxx (bit 9) error_ch1_decode
Invalid sound data has been read in Ch.1.
xxx1 xxxx xxxx xxxx (bit 12) error_rom_data_mount The sound data ROM cannot be accessed.
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.