Update AN000247 for AI MCAB

This commit is contained in:
xross
2022-08-08 16:34:17 +01:00
parent f363475529
commit 51f5d1f0b8
10 changed files with 192 additions and 356 deletions

View File

@@ -8,13 +8,13 @@ Overview
Introduction
............
The XMOS USB Audio (XUA) library provides an implemention of USB Audio Class versions 1.0 and 2.0.
The XMOS USB Audio (XUA) library provides an implementation of USB Audio Class versions 1.0 and 2.0.
This application note demonstrates the implementation of a basic USB Audio Device with
S/PDIF transmit functionality the xCORE-200 MC Audio board.
S/PDIF transmit functionality the xCORE.ai Multichannel (MC) Audio board.
To reduce complexity this application note does not enable any other audio interfaces other that S/PDIF transmit
(i.e. no I2S). Readers are encouraged to read applicaition note AN00246 in conjunction with this application
(i.e. no I2S). Readers are encouraged to read application note AN00246 in conjunction with this application
note.
@@ -30,14 +30,11 @@ The Makefile also includes::
USED_MODULES = .. lib_xud ..
``lib_xud`` library requires some flags for correct operation. Firstly the
``lib_xud`` library requires some flags for correct operation. Namely the
tile on which ``lib_xud`` will be execute, for example::
XCC_FLAGS = .. -DUSB_TILE=tile[1] ..
XCC_FLAGS = .. -DUSB_TILE=tile[0] ..
Secondly, the architecture of the target device, for example::
XCC_FLAGS = .. -DXUD_SERIES_SUPPORT=XUD_X200_SERIES ..
Includes
--------
@@ -69,7 +66,7 @@ Declarations
Allocating hardware resources for lib_xua
.........................................
A minimal implementation of a USB Audio device, without I2S functionalilty,
A minimal implementation of a USB Audio device, without I2S functionality,
using ``lib_xua`` requires the follow pins:
- Audio Master clock (from clock source to xCORE)
@@ -82,7 +79,7 @@ port for the master clock input signal.
:end-on: in port p_mclk_in
``lib_xua`` also requires two ports for internally calculating USB feedback. Please refer to
the ``lib_xua`` library documentation for further details. The additonal input port for the master
the ``lib_xua`` library documentation for further details. The additional input port for the master
clock is required since USB and S/PDIF do not reside of the same tiles on the example hardware.
These ports are declared as follows:
@@ -126,7 +123,7 @@ Other declarations
For a simple application the following endpoints are required:
- ``Control`` enpoint zero
- ``Control`` endpoint zero
- ``Isochonous`` endpoint for each direction for audio data to/from the USB host
These are declared as follows:
@@ -138,7 +135,7 @@ These are declared as follows:
Configuring lib_xua
-------------------
``lib_xua`` must be configued to enable S/PDIF Tx functionality.
``lib_xua`` must be configured to enable S/PDIF Tx functionality.
``lib_xua`` has many parameters than can be configured at build time, some examples include:
@@ -164,7 +161,7 @@ The application main() function
The ``main()`` function sets up the tasks in the application.
Various channels are required in order to allow the required tasks to communcate.
Various channels are required in order to allow the required tasks to communicate.
These must first be declared:
.. literalinclude:: app_xua_simple.xc
@@ -179,11 +176,11 @@ using the xC ``par`` construct:
:end-before: return 0
This code starts the low-level USB task, an Endpoint 0 task, an Audio buffering task and a task to handle
the audio I/O. Note, since there is no I2S funcitonality in this example this task simply forwards samples to the
the audio I/O. Note, since there is no I2S functionality in this example this task simply forwards samples to the
SPDIF transmitter task. In addition the ``spdif_tx()`` task is also run.
Note that the ``spdif_tx_port_config()`` function is called before a nested ``par`` of ``spdif_tx()`` and ``XUA_AudioHub()``.
This is because of the "shared" nature of ``p_mclk_in`` and avoids a parrallel usage check failure by the XMOS toolchain.
This is because of the "shared" nature of ``p_mclk_in`` and avoids a parallel usage check failure by the XMOS tool-chain.
|appendix|
|newpage|
@@ -191,7 +188,7 @@ This is because of the "shared" nature of ``p_mclk_in`` and avoids a parrallel u
Demo Hardware Setup
-------------------
To run the demo, connect a USB cable to power the xCORE-200 MC Audio board
To run the demo, connect a USB cable to power the xCORE.ai MC Audio board
and plug the xTAG to the board and connect the xTAG USB cable to your
development machine.
@@ -206,7 +203,7 @@ Launching the demo application
------------------------------
Once the demo example has been built either from the command line using xmake or
via the build mechanism of xTIMEcomposer studio it can be executed on the xCORE-200
via the build mechanism of xTIMEcomposer studio it can be executed on the xCORE.ai
MC Audio board.
Once built there will be a ``bin/`` directory within the project which contains
@@ -221,7 +218,7 @@ on the xCORE device::
xrun --xscope bin/app_xua_simple.xe
Once this command has executed the application will be running on the
xCORE-200 MC Audio Board
xCORE.ai MC Audio Board
Launching from xTIMEcomposer Studio
...................................
@@ -233,7 +230,7 @@ enable the xSCOPE I/O mode in the dialog box and then
select Run.
Once this command has executed the application will be running on the
xCORE-200 MC Audio board.
xCORE.ai MC Audio board.
Running the application
.......................