SimpleLink Audio Plugin Quick Start Guide

Table of Contents

Introduction

This guide is intended to assist users in the initial setup and demonstration of an audio application using the SimpleLink Audio Plugin. The guide explains how to configure the boards, compile the software artifacts, program the devices, and run an audio loop back example.

Hardware Requirements

One of the LaunchPads from the Development Board Support section of the release notes and one of the BoosterPacks or breakout boards.

Note If using a CC13x2 LaunchPad, jumper wires will also be required.

Software Requirements

Setting up the software should follow the steps below:

  1. Select a LaunchPad from the section above
  2. Install the device SDK associated with that LaunchPad
  3. Choose a toolchain (e.g. IAR, CCS) and install it
  4. Install UNIFLASH if a standalone flash programmer is needed

A device SDK is required to build and run the examples contained in the plugin. At least of one of the SDKs listed in the Dependencies section of the release notes should be installed. The SDK type should match the LaunchPad hardware. For example, to run on a CC3220SF, then the cc32xx SDK should be installed. If instead a cc26x2 or cc13x2 device is to be used then select cc13x2_26x2 SDK.

  1. Download and open the installer (replace M.mm.pp.bb with version number):
    • Windows: simplelink_audio_plugin_M_mm_pp_bb.exe
    • Linux: simplelink_audio_plugin_M_mm_pp_bb.run
    • macOS: simplelink_audio_plugin_M_mm_pp_bb.app
  2. Select an installation directory. This will be referred to as <AUDIO_INSTALL_DIR> in the rest of this document. It’s recommended that you install it in your CCS installation directory (default C:\ti on Windows) so it can be discovered automatically

  3. Click Next > and finish the installation

Hardware Setup

Codec Setup - CC3200AUDBOOST

This section will detail the steps required to get an audio loop-back example running with the CC3200AUDBOOST. This configuration uses the AudioHAL implementation that is made for I2S based CODEC devices called AudioHALCodec.

Due to pin conflicts with the CC13x2, the hardware setup is slightly different based on LaunchPad selected. Expand the containers below to see the steps for each device.

Note that if I2S slave mode is required, please expand the container and follow the steps there. Note that the hardware modifications for slave mode are needed by all supported devices.

Note it is recommended to first verify the setup using master mode and only switch to slave mode if needed.

CC26xx

CC26xx devices (all variants) may be connected by seating the CC3200AUDBOOST on the BoosterPack headers of the LaunchPad directly.

No further hardware modification is needed if master mode is to be used (default). Slave mode is discussed in the coming section

CC32xx

The CC32XX device implements a sense-on-power scheme to determine the device operation mode upon power up. The encoding of these pins determines the boot flow and the default mapping for some of the pins (UART, JTAG, etc.) The SOP pins are connected to jumper J13 on the CC32XX LaunchPad, which is shipped in flash and functional mode (010) as shown in the image below.

SOP[2…0] mode (100) is used for programming the serial flash with the application binary and/or the service pack. After flashing, the board should be reset and the mode set to (000) (no jumpers in place) to run/execute the contents of flash SOP[2…0] mode (010) is the flash and execute mode which is similar to the (100) mode except that after flashing, the contents of flash are executed immediately without having to reset or remove all jumpers. This mode is also used when using CCS (or IAR) to connect to the device for loading and debugging.

CC32xx jumper wires

CC32xx devices (all variants) may be connected by seating the CC3200AUDBOOST on the BoosterPack headers of the LaunchPad directly.

No further hardware modification is needed if master mode is to be used (default). Slave mode is discussed in the coming section.

CC13x2

The following pins are used for the CC13x2. Remember that MCLK is only used in I2S slave mode, else it is assumed that MCLK is tied to BCLK. See the Users Guide for more information.

CC13x2 LaunchPad Pin CC3200AUDBOOST Pin
IOID_25 (ADO) J1.18 (DIN)
IOID_26 (ADI) J1.20 (DOUT)
IOID_27 (BCLK) J1.16 (BCLK)
IOID_23 (MCLK)* TP13 (MCLK)

* Note MCLK is only used in I2S slave mode.

Note that WCLK is different for P vs R versions of the CC13x2 LaunchPad:

LaunchPad Pin CC3200AUDBOOST Pin
CC13x2R IOID_28 (WCLK) J1.14 (WCLK)
CC13x2P IOID_16 (WCLK) J1.14 (WCLK)

When running jumper wires, it is also necessary to provide the AUDBOOST with 5V, 3V3, and GND connections. Additionally it is necessary to connect the I2C lines (SDA, SCL) to J1.19 and J1.17 respectively. Check the *_LAUNCHXL.h board file to find the pins of SDA and SCL. An easy way to do this is to bend the pins of LaunchPad that have a collision with the CC3200AUDBOOST. Then the CC3200AUDBOOST can safely be seated on top of the LP.

The steps to make this modification are below

  1. Bend the necessary pins on the LaunchPad (see below)
  2. Seat CC3200AUDBOOST on LaunchPad’s BoosterPack headers
  3. Add jumper wires as needed from the table above.

For CC13x2R devices the bottom two pins on J3 should be bent (see picture below). These pins are bent to prevent collision with the RF ports. Note that strictly speaking CC1312R does not require bending the bottom pin, but then IOID_1 must not be used or driven.

CC13x2R Pin Bend

For CC13x2P devices the bottom 5 pins on J3 should be bent (see picture below).

CC13x2P Pin Bend

Once the pin has been bent, you can seat the CC3200AUDBOOST and set up the jumper wires.

The picture below shows the setting for CC13x2R devices.

Wire color Signal
yellow ADO
green ADI
blue BCLK
purple WCLK
white MCLK

CC13x2R jumper wires

The picture below shows the setting for CC13x2P devices:

Wire color Signal
yellow ADO
green ADI
blue BCLK
purple WCLK
white MCLK

CC13x2P jumper wires

Note: The jumper wires should be kept as short and tied as possible (if not they could act as antennas and add noise to the audio pins)

(Optional) I2S Slave Mode

By default, the applications in this SDK will use I2S master mode.

However, slave mode is supported by both the AudioHAL and the I2S driver.

In slave mode, the CCxxxx device must generate a reference clock for the codec on the CC3200AUDBOOST to use as an input to its PLL (MCLK). The AudioHAL may be configured to support MCLK generation in slave mode. See the AudioHAL Doxygen listed above for information on how to configure this.

The CC3200AUDBOOST ties BCLK and MCLK pins together via a 0-Ohm resistor. Since in slave mode we require separate BCLK and MCLK, this resistor must be removed. Instructions on how to remove this resistor can be found below.

The AudioHAL framework relies on BCLK and MCLK being independent signals, the CC3200AUDBOOST has tied these signals together via a 0 Ohm resistor.

This resistor must be removed if I2S slave mode is required. See pictures below on how to find this resistor.

CC3200AUDBOOST HW MOD

CC3200AUDBOOST Silkscreen

Building and running Examples in CCS

Several examples are provided in the Plugin and can be found in the examples/ subdirectory.

These steps refer to the audiohal_echo application for the CC2642R1 device, but the same procedure applies to any supported device and to other examples as well.

  1. It is assumed that the SimpleLink cc13x2_26x2 SDK has already been installed in a directory we will refer to as <SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR>. You should install it if you have not already done so. See the Dependencies section of the release notes for more information

  2. Open Code Composer Studio (close and re-open if already running before Plugin or SDK installation).

  3. In CCS, import the audiohal_echo example by first selecting Project > Import CCS Projects…

  4. In the Import CCS Projects window, hit the browse button to browse to the location corresponding to <AUDIO_INSTALL_DIR>\examples. Select the checkbox next to the audiohal_echo example for tirtos for CCS and hit the Finish button.

  5. Two projects should appear in the Project Explorer tab in CCS: one for the audiohal_echo example itself (i.e. audiohal_echo_CC26X2R1_LAUNCHXL_tirtos_ccs), and the other is a project corresponding to the OS chosen (e.g. tirtos_builds_CC26X2R1_LAUNCHXL_release_ccs).

  6. The example comes with a README.html file that contains more details specific to the example. Be sure to take a look as it may contain additional instructions.

  7. Right-click on the audiohal_echo project, and select Build Project to build.

Load and run the Example

  1. Plug the LaunchPad into a USB port on your PC.

  2. Plug 3.5 mm audio jack into LINE IN connector on CC3200AUDBOOST.

  3. Plug headphones to the LINE OUT connector on CC3200AUDBOOST. Setup should look as below:

  1. Right-click on the audiohal_echo project, and select Debug As > Code Composer Debug Session. If using CC32xx note the SOP[2..0] jumper setting on the board must be (010) in order for the CCS debugger to connect.

  2. Run the application by pressing F8. Audio will begin playing on the headphones, it is being looped back through the LaunchPad.

Building and running Examples in IAR

Download and Installation

For instructions on downloading and setting up IAR properly for use with the SimpleLink SDK and its plugins, please refer to the Quick Start Guide from the selected dependent device SDK. As part of the procedure, make sure to configure the environmental variables for the SDK.

Configuring the environmental variables

Before starting to work with any of the SimpleLink Audio Plugin example projects, you need to load a set of environment variables that will be set for your current workspace, in addition to the ones from the SimpleLink SDK.

The custom argvars can be found at /tools/iar/simplelink_audio_plugin_.custom_argvars. is either cc2640r2, cc13x2_26x2, or cc32xx. Select the argvars that correspond to the dependent SDK that you are using.

If you need to modify the default path argument variables, edit the variables with the correct path.

  1. Open the IAR IDE

  2. Choose Tools > Configure Custom Argument Variables

  3. Click Global > Import

  4. Browse to /tools/iar. Import the custom argvars.

Importing your First Project

These steps refer to the audiohal_echo application for the CC2642R1 device, but the same procedure applies to any supported device and to other examples as well.

You can choose to open an Example Project by either directly accessing the Example workspace (by double clicking on its *.eww file), or by importing the Example from the Example List in the IDE.

Directly accessing an Example from the Example Folder

All Code Examples that are shipped with the plugin come with an IAR workspace (*.eww file). Double-Clicking the specific workspace allows you to open the project on disk and build it.

Each example comes with a README.html file. Be sure to take a look in case it has additional instruction specific to the example you wish to run. Update the example to use your Azure connection string and WiFi Access Point information, as specified in the section Example Pre-Build Steps.

Importing an Example in the Example List

  1. In the IAR-IDE, select File > Open File… from the menu and open <AUDIO_INSTALL_DIR>/tools/iar/Examples.html

  2. All SimpleLink Audio Plugin example projects that are available in IAR are listed in the html page.

  3. Scroll through the page and click on the project you are interested in. In this guide we choose to work with audiohal_echo for the CC2642R1 based on TI-RTOS.

  1. When prompted, click Yes to save a copy of the project workspace in a specific folder, No will save the workspace in a default folder.

  2. After clicking Yes, browse to the location where you want to save this workspace. Click Choose

Building the project

  1. Two projects should appear in the Workspace tab in IAR: one for the 1audiohal_echo example itself (i.e. audiohal_echo_CC26X2R1_LAUNCHXL_tirtos_iar), and the other is a project corresponding to the OS chosen (e.g. tirtos_builds_CC26X2R1_LAUNCHXL_release).

  2. The example comes with a README.html file that contains more details specific to the example. Be sure to take a look as it may contain additional instructions.

  3. Make/Build the Example Project by first selecting the OS project tab on the Workspace window and select Project > Make. Once done, select the audiohal_echo tab on the Workspace window and select Project > Make.

Start a debug session

To start an IAR debug session follow the steps outlined in the Run a debug session section in the QuickStart for IAR IDE chapter of the corresponding SDK’s Quick Start Guide document.

Load and run the Example

  1. Plug the LaunchPad into a USB port on your PC.

  2. Plug 3.5 mm audio jack into LINE IN connector on CC3200AUDBOOST.

  3. Plug headphones to the LINE OUT connector on CC3200AUDBOOST. Setup should look as below:

  1. Select Project > Download and Debug If using CC32xx note the SOP[2..0] jumper setting on the board must be (010) in order for the CCS debugger to connect.

  2. Run the application by pressing F5. Audio will begin playing on the headphones, it is being looped back through the LaunchPad.

Building with Makefiles

These steps refer to audiohal_echo application, but the same procedure applies to other examples as well.

  1. It is assumed that the SimpleLink CC13x2_26x2 SDK has already been installed in a directory we will refer to as . You should install it if you have not already done so, as the SimpleLink Audio Plugin depends on it.

  2. Update the imports.mak file in the root folder with the appropriate path(s). You may check the imports.mak inside the dependent device SDK for help. Only relevant paths are required. For example, if IAR is not to be used, this path can be left untouched.

Navigate to the directory corresponding to your OS, board and toolchain of choice. For example, <SIMPLELINK_CC13X2_26X2_SDK_INSTALL_DIR>/kernel/tirtos/builds/CC26X2R1_LAUNCHXL/release/ccs \ for tirtos and TI (CCS) toolchain on the CC26x2 LaunchPad.

Run ‘make’ to build the OS. If you develop on a Windows machine and do not have the ‘make’ utility, you can alternatively run ‘gmake’ from your TI XDCTOOLS installation (e.g. ‘C:\ti\xdctools_x_xx_xx_xx_core\gmake.exe’). XDCTOOLS is a dependency of the device SDKs and the SimpleLink Audio Plugin. See the release notes for the required version.

Navigate to the example folder specific to your board(replace CC26X2R1_LAUNCHXL with your board name): /examples/rtos/CC26X2R1_LAUNCHXL/audio/audiohal_echo

Read the README.html file of the example, and follow any additional instructions specific to the example if present.

Navigate to the example folder specific to your OS, board and toolchain /examples/rtos/CC26X2R1_LAUNCHXL/audio/audiohal_echo/tirtos/ccs

To build, run ‘make’ to generate audiohal_echo.out

You can load and debug the generated audiohal_echo.out in CCS (or IAR)