Epson Arm S1C31 Series Technical Manual page 313

Cmos 32-bit single chip microcontroller
Table of Contents

Advertisement

22 HW Processor (HWP) and Sound Output (SDAC2)
9. Perform the following settings when using the HWP interrupt:
- Set the HWP interrupt level (refer to the documents introduced in Section 3.4, such as "Cortex
Devices Generic User Guide").
- Write 0 to all the interrupt flags in the HWPINTF register.
Note: Be aware that the write value to clear flags is different from other peripheral circuits.
- Set the HWPINTE.HWPIE bit to 1.
Checking HWP operation (Sound Play function)
10. Set the SDAC2MOD.PWMOUTEN bit to 1.
11. Enable the external amplifier using a general-purpose output port (if necessary).
* Set a wait time according to the amplifier specifications after being enabled.
12. Set the HWPCTL.HWPEN bit to 1.
13. Wait until the HWPINTF.HWP0IF bit is set to 1 and the STATE_n.STATE[15:0] bits are set to 0x0001
(sp_state_idle = Sound Play function idle state).
Initialize the SDAC2 and HWP in this order again if the HWPINTF.HWP1IF bit = 1.
Sound play state transition
Figure 22.4.1.1 shows the sound play state transition diagram.
HWPCTL.HWPEN bit = 0
Sound play function
sp_state_mute
Release Mute command execution
As shown in Figure 22.4.1.1, there are six operating states in the Sound Play function.
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 Sound Play function regis-
ters as shown in "Initialization" above, the HWP transits to sp_state_init state.
2) sp_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 Sound Play function registers. Upon completion of the initial processing, the HWP
transits to sp_state_idle state.
3) sp_state_idle
This is a standby state in which the Sound Play function stops playback output. This state allows issuance of
the Sound Start command. After the Sound Start command is issued, the HWP transits to sp_state_play state to
start playback output.
22-6
MCU boot up
hwp_sleep
sp_state_init
sp_state_idle
Mute command execution
sp_state_play
Figure 22.4.1.1 Sound Play State Transition Diagram
Seiko Epson Corporation
(Clear interrupt flags)
(Enable interrupts)
(Enable sound output)
(Enable HWP)
FUNCTION.ID[7:0] bits = 0x01 (sound play),
HWPCTL.HWPEN bit = 1
Pause command execution
Release Pause command execution
-M0+
®
sp_state_pause
S1C31D41 TECHNICAL MANUAL
(Rev. 1.1)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Arm s1c31d41

Table of Contents