MAS 3504D
Table 3–6: Command Register Table
Address
(hex)
Mode
Function
Default
Name
(hex)
8000
0
8E
FD
FC
74
w
DC/DC operation control
DCCF
r/w
r/w
r/w
r/w
r/w
r/w
Operation mode selection
UserControl
Volume
Output volume
7FFFF
0
Serial interface wordlength
Wordlength
InputConfig
OutputConfig
HWControl
E1
61
Configuration of the I2S audio input interface
Configuration of the I2S audio output interface
Special operation options
4
4000
0
FA
3.5.2.1. Data Transmission Format
To switch to encoder operation mode, UserControl has
to be set to 3hex. Then 50 frames are encoded and
sent via the PIO interface. This is repeated until the
UserControl register is changed. If the transmission of
headers is enabled, each page of 50 frames is pre-
ceeded by a header frame as shown in Table 3–7.
The codec is working on a page basis. That means,
that encoding and decoding is performed in blocks of
50 G.729 frames, whereas each frame consists of
10 bytes in byte swapped order (see Fig. 3–2). There-
fore most changes to the UserControl register become
effective when processing of a page is finished. The
pages are optionally preceeded by 10 byte header
frames (see Table 3–7).
To switch off the encoder, UserControl has to be set to
0hex. Then the encoding and sending of frames contin-
ues until the end of the current page and the operation
mode is set to stop.
Table 3–7: Content of Page Header
3.5.2.3. Decoder Operation
Byte
1
2
3
4
5
6
7
8
9
10
The routines for the G.729 decoder mode are com-
pletely located in the MAS 3504D firmware. So there is
no need to download the encoder routine in a decode
only application.
Value 64 6D 72 31 64 61 74 61 F4 01
[hex]
To switch to decoder operation mode, UserControl has
to be set to 1hex. For decoding with slow speed, set
UserControl to 11hex. For decoding with fast speed, set
UserControl to 21hex. Then the decoder is requesting
several frames via the PIO interface to fill its internal
buffer. If enough data is available, 50 frames are
decoded. This is repeated until the UserControl regis-
ter is changed. If the transmission of headers is
enabled, a header frame (as shown in Table 3–7) has
to be sent before each page of 50 frames.
Switching from encoding to decoding mode or vice
versa directly is not allowed. Instead the controller has
to send a stop request to the MAS 3504D (writing 0hex
to UserControl). Then the controller has to keep on
sending data in decoding mode or receive data in
encoding mode until the current page of 50 frames is
finished. After this run out time, the encoding or decod-
ing can be started again.
3.5.2.2. Encoder Operation
To switch off the decoder, UserControl has to be set to
0hex. Then the decoding of frames continues until the
end of the current page and the operation mode is set
to stop.
To enable the G.729 encoder mode, a special routine
has to be downloaded to the MAS 3504D IC first. This
has to be done with an I2C download before the
encoder is started the first time. If the encoder is
started without downloading the routine, the behavior
of the IC is unpredictable.
Micronas
17