USB Audio Design Guide
This method of port usage (i.e. sharing a port between cores) is outside the
standard XC usage model so is implemented using inline assembly as required.
The
peek
instruction is used to get the current output value on the port:
/* P e e k at c u r r e n t p o r t v a l u e u s i n g p o r t 32 A r e s o u r c e ID */
asm ( " p e e k %0 , res [ % 1 ] " := r " ( x ) : " r " ( X S 1 _ P O R T _ 3 2 A ) ) ;
The required output value is then assembled using the relevant bit-wise operation(s)
before the
out
instruction is used directly to output data to the port:
/* O u t p u t to p o r t */
asm ( " out res [%0] , %1 " :: " r " ( X S 1 _ P O R T _ 3 2 A ) , " r " ( x ) ) ;
The table Figure
shows the signals connected to port 32A on the USB Audio
Class 2.0 reference design board. Note, they are all
outputs
from the XS1-L device.
Pin
Port
Signal
XD49
P32A0
USB_PHY_RST_N
XD50
P32A1
CODEC_RST_N
XD51
P32A2
MCLK_SEL
XD52
P32A3
LED_A
XD53
P32A4
LED_B
Figure 34:
Port 32A
Signals
6.1.2
Clocking
The board has two on-board oscillators for master clock generation. These produce
11.2896MHz for sample rates 44.1, 88.2, 176.4KHz etc and 24.567MHz for sample
rates 48, 96, 192kHz etc.
The required master clock is selected from one of these using an external mux cir-
cuit via port
P32A[2]
(pin 2 of port 32A). Setting
P32A[2]
high selects 11.2896MHz,
low selects 24.576MHz.
The reference design board uses a 24 bit, 192kHz stereo audio CODEC (Cirrus
Logic CS4270).
The CODEC is configured to operate in
stand-alone mode
meaning that no serial
configuration interface is required. The digital audio interface is set to I2S mode
with all clocks being inputs (i.e. slave mode).
The CODEC has three internal modes depending on the sampling rate used. These
change the oversampling ratio used internally in the CODEC. The three modes are
shown below:
In stand-alone mode, the CODEC automatically determines which mode to operate
in based on input clock rates.
XM0088546.1
Summary of Contents for xCORE-200 Multi-channel Audio board
Page 6: ...1 Overview XM0088546 1...