RALCWI Vocoder
CMX608/CMX618/CMX638
become available until approximately 80ms later. The most convenient sync to use, in this case, is the
pulse every 20ms.
At the occurrence of a pulse, the device should be instructed to encode. The next three pulses should be
ignored. At the next pulse (which is 80ms after the initial encode instruction) the host should read the
Vocoder packet and transmit it. Every 3rd pulse thereafter, another packet should be read and
transmitted.
The slave should supply to its Vocoder a pulse on the sync pin every time it receives a packet of data from
the master. This will then keep the slave's CODEC in sync with the master's CODEC.
6.6.
Setting the Watermarks for the Vocoder Data Input (Output) FIFOs
Vocoder data is stored in a circular input (output) buffer, configured as a FIFO, before (after) being
consumed (generated) by the Vocoding process. This buffer is 5 x 20ms long and care must be taken not
to accidentally overwrite the buffer. For example, if the Vocoder is set to process 4 frames per packet (ie
an 80ms packet), the low watermark should be set to less than 20ms and the high watermark should be
set to a non-critical value of 70ms. The low watermark conditions are:
LowWatermarkValue
100
(Frames per Packet 20) Processing Time HostµC VDW ResponseTime 0
8
Note that the Processing Time and Host µC Response Time are both measured in milliseconds (ms) and
that a Low Watermark Value of 160, which would be programmed into bits 0 - 10 of the VDWHLWM
register ($1E), corresponds to a low watermark of 20ms (the same as a single frame of vocoded data).
6.7.
Download Protocol for Function Images™
New features and enhancements to existing functions are available as Function Images™. These are
downloaded into the device over the C-BUS via the DECFRAME register ($10). The data is sent in packets
of 128 bytes. The Function Image™ will always be a whole multiple of 128 bytes. The following steps
should be taken to download a Function Image™. Please check the documentation supplied with any
Function Image™ which may detail a deviation from the following instructions.
1. Reset the device. This can be achieved by using either the RESETN pin (30), or by writing to the
C-BUS RESET register ($01).
2. Wait until the device indicates that it is ready. This can be done by either polling the STATUS
register ($40) and waiting for bit 15 (RDY) to be set to '1', or waiting until IRQN goes low, and then
reading the STATUS register to reset it (bit 15 will have been set to '1').
3. If the process is to be interrupt driven (i.e. using IRQN to indicate a change in the STATUS
register), then write the value of $C000 to the IRQENAB register ($1F). This will enable interrupts
for the SVC bit (bit 14), which is used in the download protocol.
4. Write the value of $01 to the SVCREQ register ($0E). This indicates to the device that a Function
Image™ is to be downloaded.
5. Wait for bit 14 to be set to '1' in the STATUS register (either by polling or waiting for IRQN to go
low).
6. Read the SVCACK register ($2E) and check that bit 0 is set to '1'. This indicates that the device is
able to accept a Function Image™.
7. Write 128 bytes of Function Image™ data to the DECFRAME register ($10). This may be done as
a single 128-byte streaming write, 128 single byte writes or 64 x 2-byte writes.
2014 CML Microsystems Plc
59
D/608_18_38/11