MAS 3504D
3.2. Command Structure
3.2.1. Conventions for the Command Description
The I2C control of the MAS 3504D is done completely
via the I2C data register by using a special command
syntax. The commands are executed by the
MAS 3504D during its normal operation without any
loss or interruption of the incoming data or outgoing
audio data stream. These I2C commands allow the
controller to access internal states, RAM contents,
internal hardware control registers, and to download
software modules. The command structure allows
sophisticated control of the MAS 3504D. The registers
of the MAS 3504D are either general purpose, e.g. for
program flow control, or specialized registers that
directly affect hardware blocks. The unrestricted
access to these registers allows the system controller
to overrule the firmware configuration.
The description of the various controller commands
uses the following formalism:
– A data value is split into 4-bit nibbles which are
numbered beginning with 0 for the least significant
nibble.
– Data values in nibbles are always shown in hexa-
decimal notation indicated by a preceding $.
– A hexadecimal 20-bit number d is written, e.g. as
d = $17C63, its five nibbles are
d0 = $3, d1 = $6, d2 = $C, d3 = $7, and d4 = $1.
– Abbreviations used in the following descriptions:
a
d
n
o
r
address
data value
count value
offset value
register number
don’t care
The MAS 3504D firmware scans the I2C interface peri-
odically and checks for pending or new commands.
Table 3–4 on page 13 shows the basic controller com-
mands that are available by the MAS 3504D.
x
– Variables used in the following descriptions:
dev_write
dev_read
$3A
$3B
data_write $68
data_read $69
Table 3–4: Basic Controller Commands
Code
[hex]
Command
run
Comment
0
1
Start execution of an internal program. (Run 0 means freeze operating sys-
tem.)
9
write register
write to memory
An internal register of the MAS 3504D can be written directly to by the con-
troller.
A
B
A block of the DSP memory can be written to by the controller. This feature
may be used to download alternate programs.
D
read register
read memory
The controller can read an internal register of the MAS 3504D.
A block of the DSP memory can be read by the controller.
E
F
Micronas
13