Integration; External Clock Recovery (Clockgen) - XMOS xCORE-200 Multi-channel Audio board Design Manual

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide
Channel 7 sample
Example of code show how to read the output of the ADAT component is shown
below:
control = inuint ( oChan ) ;
for ( int i = 0; i < 8; i ++)
{
}
Samples are 24-bit values contained in the lower 24 bits of the word.
The control word comprises four control bits in bits [11..8] and the value
0b00000001 in bits [7..0]. This control word enables synchronization at a higher
level, in that on the channel a single odd word is always read followed by eight
words of data.

3.9.1 Integration

Since the ADAT is a digital stream the devices master clock must synchronised to
it. This is typically achieved with an external fractional-n clock multiplier.
The ADAT receive function communicates with the clockGen component which
passes audio data onto the audio driver and handles locking to the ADAT clock
source if required.

3.10 External Clock Recovery (ClockGen)

An application can either provide fixed master clock sources via selectable oscil-
lators, clock generation IC, etc, to provide the audio master or use an external
PLL/Clock Multiplier to generate a master clock based on reference from the XMOS
device.
Using an external PLL/Clock Multiplier allows the design to lock to an external
clock source from a digital stream (e.g. S/PDIF or ADAT input).
The clock recovery core (clockGen) is responsible for generating the reference
frequency to the Fractional-N Clock Generator. This, in turn, generates the master
clock used over the whole design.
When running in Internal Clock mode this core simply generates this clock using a
local timer, based on the XMOS reference clock.
When running in an external clock mode (i.e. S/PDIF Clock" or "ADAT Clock" mode)
digital samples are received from the S/PDIF and/or ADAT receive core.
The external frequency is calculated through counting samples in a given period.
The reference clock to the Fractional-N Clock Multiplier is then generated based
on this external stream. If this stream becomes invalid, the timer event will fire to
XM0088546.1
sample [ i ] = inuint ( oChan ) ;
38/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents