16 16-BIT AUDIO PWM TIMER (T16P)
16-10
Seiko Epson Corporation
S1C33L26 TECHNICAL MANUAL
DMA Transfer
16.5.2
The causes of buffer empty interrupts can invoke a DMA. This allows continuous data transfer via the DMAC be-
tween memory and the compare A buffer. The buffer empty interrupt signal is output to both the ITC and DMAC.
Therefore, DMA transfer can be performed without generating a T16P interrupt.
For more information on DMA transfer, see the “DMA Controller (DMAC)” chapter.
Control Register Details
16.6
6.1 List of T16P Registers
Table 16.
Address
Register name
Function
0x301200
T16P_A
T16P Compare A Buffer Register
Compare A data
0x301202
T16P_B
T16P Compare B Buffer Register
Compare B data
0x301204
T16P_CNT_DATA T16P Counter Data Register
Counter data
0x301206
T16P_VOL_CTL
T16P Volume Control Register
Enables the volume control and sets a volume level.
0x301208
T16P_CTL
T16P Control Register
Sets the timer operating conditions.
0x30120a
T16P_RUN
T16P Running Control Register
Starts/stops the timer.
0x30120c
T16P_CLK
T16P Internal Clock Control Register
Selects an internal count clock.
0x30120e
T16P_INT
T16P Interrupt Control Register
Controls T16P interrupts.
The T16P registers are described in detail below. These are 16-bit registers.
Note: When data is written to the registers, the “Reserved” bits must always be written as 0 and not 1.
T16P Compare A Buffer Register (T16P_A)
Register name Address
Bit
Name
Function
Setting
Init. R/W
Remarks
T16P Compare
A Buffer
Register
(T16P_A)
0x301200
(16 bits)
D15–0 CMPA[15:0] Compare A data
CMPA15 = MSB
CMPA0 = LSB
0x0 to 0xffff
X
R/W
D[15:0] CMPA[15:0]: Compare A Data Bits
Sets compare A data (PCM data) to be converted to a pulse width. (Default: undefined)
The buffer data is loaded to the compare A register when the timer starts counting or when a B match
occurs specified number of times, and is compared with the counter value. The output signal level is
inverted at the beginning of a pulse period and when the counter reaches the compare data stored in the
compare A register. This operation converts audio data set to the compare A buffer into a pulse width.
When the data written to the compare A buffer is loaded to the compare A register, the buffer empty
interrupt flag (BUFEF/T16P_INT register) is set to 1 and an interrupt occurs if buffer empty interrupts
are enabled. Also this cause of interrupt can invoke a DMA transfer. By using this interrupt or DMA
transfer, the next output data can be set to the compare A buffer.
When the counter reaches the compare data A, the A match interrupt flag (INTAF/T16P_INT register)
is set to 1 and an interrupt occurs if A match interrupts are enabled. This type of interrupts does not oc-
cur in split mode or when 8-bit PCM data resolution is selected.
The pulse width set by compare A data is as follows:
In normal comparison mode (SELFM/T16P_CTL register = 0)
Output pulse width = CMPA
×
Count clock cycle
(CMPA: CMPA[15:0] in normal mode, CMPA[15:n] or CMPA[(n-1):0] in split mode)
In fine mode (SELFM = 1)
Output pulse width = CMPA
×
PCLK1 cycle
×
1/2
(CMPA: CMPA[15:0] in normal mode, CMPA[15:n] or CMPA[(n-1):0] in split mode)
8-bit audio data should be written to CMPA[15:8] in 8-bit size.