Port Configuration (Xcore Master) - 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
3.5.1 Port Configuration (xCORE Master)
The default software configuration is CODEC Slave (xCORE master). That is, the
XMOS device provides the BCLK and LRCLK signals to the CODEC.
XS1 ports and XMOS clocks provide many valuable features for implementing I2S.
This section describes how these are configured and used to drive the I2S interface.
L8A-64-TQ128
Figure 14:
Ports and
Clocks
(CODEC slave)
The code to configure the ports and clocks is in the ConfigAudioPorts() function.
Developers should not need to modify this.
The XMOS device inputs MCLK and divides it down to generate BCLK and LRCLK.
To achieve this MCLK is input into the device using the 1-bit port p_mclk . This
is attached to the clock block clk_audio_mclk , which is in turn used to clock the
BCLK port, p_bclk . BCLK is used to clock the LRCLK ( p_lrclk ) and data signals
SDIN ( p_sdin ) and SDOUT ( p_sdout ). Again, a clock block is used ( clk_audio_bclk )
which has p_bclk as its input and is used to clock the ports p_lrclk , p_sdin and
p_sdout . The preceding diagram shows the connectivity of ports and clock blocks.
p_sdin and p_sdout are configured as buffered ports with a transfer width of 32,
so all 32 bits are input in one input statement. This allows the software to input,
process and output 32-bit words, whilst the ports serialize and deserialize to the
single I/O pin connected to each port.
xCORE-200 series devices have the ability to divide an extenal clock in a clock-block.
However, XS1 based devices do not have this functionality. In order achieve the
reqired master-clock to bit-clock/LR-clock divicd on XS1 devices, buffered ports
with a transfer width of 32 are also used for p_bclk and p_lrclk . The bit clock
is generated by performing outputs of a particular pattern to p_bclk to toggle
the output at the desired rate. The pattern depends on the divide between the
XM0088546.1
clk_audio_mclk
clk_audio_bclk
p_mclk
Audio master clock
p_bclk
p_lrclk
p_sdin
p_sdout
29/110
CODEC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents