Epson S1C31D50 Technical Manual page 317

Cmos 32-bit single chip
Hide thumbs Also See for S1C31D50:
Table of Contents

Advertisement

4. Set the SDACDAT.DAT[9:0] bits to 0x000.
5. Disable SDAC interrupts to occur.
- Set the SDACINTE register to 0x0000.
- Write 0x0003 to the SDACINTF register.
Initializing HWP (sound play function)
6. Set the HWPCTL.HWPEN bit to 0.
7. Set the following HWP internal register bits (sound play function register bits):
- Set the FUNCTION.ID[7:0] bits to 0x01.
- INTMASK.TO_MUTE bit
- INTMASK.TO_PAUSE bit
- INTMASK.TO_PLAY bit
- INTMASK.TO_IDLE bit
- ROMADDR.ADDRESS[31:0] bits
- ROMSIZE.SIZE[31:0] bits
- KEYCODE.KEYCODE[31:0] bits
8. Perform the following settings when using the HWP interrupt:
- Set the HWP interrupt level (refer to the "Cortex®-M0+ Technical Reference Manual").
- Write 0 to all the interrupt flags in the HWPINTF register. (Clear interrupt flags)
Note: Be aware that the write value to clear flags is different from other peripheral circuits.
- Set the HWPINTE.HWPIE bit to 1.
Starting HWP operation (sound play function)
9. Set the SDACMOD.PWMOUTEN bit to 1.
10. Enable the external amplifier using a general-purpose output port (if necessary).
* Set a wait time according to the amplifier specifications after being enabled.
11. Set the HWPCTL.HWPEN bit to 1.
12. 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 SDAC and HWP in this order again if the HWPINTF.HWP1IF bit = 1.
Initialization (when outputting sound from T16B Ch.0 in S1C31D51)
When outputting sound using the T16B Ch.0, initialize the SDAC, T16B Ch.0, and HWP in this order as shown
below.
Initializing SDAC
1. Configure the SDAC output pins as general-purpose ports. (Refer to the "I/O Ports" chapter.)
- P5MODSEL register = (P5MODSEL & 0x00fc) | 0x0000
2. Configure the SDAC operating clock. (Refer to "Section 21.3, Clock Settings.")
- Set the SDACCLK.CLKSRC[1:0] bits to 0x02.
- Set the SDACCLK.CLKDIV[1:0] bits to 0x0.
- Set the SDACCLK.DBRUN bit to 1.
3. Set the SDACCTL.SDACEN bit to 1.
4. Set the SDACDAT.DAT[9:0] bits to 0x000.
5. Disable SDAC interrupts to occur.
- Set the SDACINTE register to 0x0000.
- Write 0x0003 to the SDACINTF register.
Initializing T16B Ch.0
6. Assign the T16B Ch.0 TOUT outputs to the ports (UPMAX) used for sound output.
S1C31D50/D51 TECHNICAL MANUAL
(Rev. 2.00)
21 HW Processor (HWP) and Sound Output
Seiko Epson Corporation
(Clear sound data register)
(Disable interrupts)
(Clear interrupt flag)
(Disable HWP)
(Select sound play function)
(Set mute interrupt mask)
(Set pause interrupt mask)
(Set playback start interrupt mask)
(Set idle state interrupt mask)
(Set sound ROM data start address)
(Set sound ROM data size)
(Set key code)
(Enable interrupts)
(Enable sound output)
(Enable HWP)
(Clock source = OSC3)
(Clock division ratio = 1/1)
(Enable clock supply in DEBUG mode)
(Enable SDAC)
(Clear sound data register)
(Disable interrupts)
(Clear interrupt flag)
21-5

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c31d51

Table of Contents