Memory programming. STMicroelectronics STA321
Advertisement
Advertisement
Digital processing stage STA321
shows the RAM mapping for the programmable functions in the signal processing stage. Changing or reading this data is done through the I
2
C interface in either
single-word mode or in multi-word mode. Register PROCCTRL on page 107 sets the
desired mode and whether to read or write: z z
1-word mode: this is for write only; the address of the memory location must be specified in registers
and the value of the parameter must
be written into registers I2CB0_TOP
,
I2CB0_MID and I2CB0_BOT on page 102
.
5-word mode: in this case it is possible to write/read 5 contiguous locations. Only the address of the first one must be specified in registers START_ADD1-2, all the others are generated automatically. The values of the parameters must be placed in (or taken from) registers
The 5-word mode is particular useful during the biquad programming when a set of five coefficients needs to be updated. Not only is it more efficient to change all of them at the same time but it avoids the generation of possible unpleasant acoustical side-effects.
The following sections explain how to implement this programming using the I
2
C interface.
6.14.1 Writing one coefficient/location to RAM z z z z z
Write RAM address to registers START_ADDR2
and
(b0) Write 8 MSBs of coefficient in register
Write 8 middle bits of coefficient in register
Write 8 LSBs of coefficient in register
Write 1 to bit W1 in register
.
Figure 26.
Writing RAM location
Write address to
START_ADDR[8:0]
0x61 = address[8]
0x62 = address[7:0]
Write top 8 bits of coefficient
0x51 = top_val
Write middle 8 bits of coefficient
0x52 = mid_val
Write bottom 8 bits of coefficient
0x53 = bot_val
Write 1 to bit W1 in PROC_CTRL
0x60 = 0x01
44/157 Doc ID 15351 Rev 3
Download
Advertisement