:orphan:

#########################################################
AN02019: Using Device Firmware Upgrade (DFU) in USB Audio
#########################################################

:vendor: XMOS
:version: 1.0.1
:scope: General Use
:description: DFU in USB Audio applications
:category: Audio
:keywords: USB Audio, USB, Booting, Memory
:hardware: XK-AUDIO-316-MC

*******
Summary
*******

This application note describes the Device Firmware Upgrade (DFU) process for a `XMOS` USB Audio
reference applications.

The DFU implementation in these applications is compliant with version 1.1 of the
`Universal Serial Bus Device Class Specification for Device Firmware Upgrade <https://www.usb.org/sites/default/files/DFU_1.1.pdf>`_.

The information in this note relates to all applications in the USB Audio reference design download
(``sw_usb_audio``). However, for convenience and demonstration, this note also includes a DFU
capable USB audio
applications for the `XK-AUDIO-316-MC` board.

On building, two applications binaries are produced: A factory image that the device should be
flashed with initially and an upgrade image that is used for demonstrating the DFU operation.
The factory and upgrade images differ in their `bcdDevice` version. This allows the user to quickly
verify the success of the upgrade process by checking the `bcdVersion` number of the device
enumerated post upgrade.

********
Features
********

* Description of preparing factory and upgrade images
* Description of DFU via:
   * Thesycon TL-USBDFU
   * A small custom DFU codebase (`xmosdfu`)
   * `dfu-util <https://github.com/Stefan-Schmidt/dfu-util>`_

************
Known issues
************

* None

**************
Required tools
**************

* XMOS XTC Tools: 15.3.0

*********************************
Required libraries (dependencies)
*********************************

* `lib_adat <https://www.xmos.com/libraries/lib_adat>`_
* `lib_board_support <https://www.xmos.com/libraries/lib_board_support>`_
* `lib_dfu <https://www.xmos.com/libraries/lib_dfu>`_
* `lib_dsp <https://www.xmos.com/libraries/lib_dsp>`_
* `lib_i2c <https://www.xmos.com/libraries/lib_i2c>`_
* `lib_locks <https://www.xmos.com/libraries/lib_locks>`_
* `lib_logging <https://www.xmos.com/libraries/lib_logging>`_
* `lib_mic_array <https://www.xmos.com/libraries/lib_mic_array>`_
* `lib_spdif <https://www.xmos.com/libraries/lib_spdif>`_
* `lib_sw_pll <https://www.xmos.com/libraries/lib_sw_pll>`_
* `lib_xassert <https://www.xmos.com/libraries/lib_xassert>`_
* `lib_xua <https://www.xmos.com/libraries/lib_xua>`_
* `lib_xud <https://www.xmos.com/libraries/lib_xud>`_

*************************
Related application notes
*************************

* None
