Introduction to the SimpleLink Low Power F3 SDK

The SimpleLink Low Power F3 SDK delivers components that enable engineers to develop applications on the Texas Instruments SimpleLink CC23xx family of wireless microcontroller (MCUs). This powerful software toolkit provides a cohesive and consistent software experience for all SimpleLink CC23xx wireless MCU users by packaging essential software components, such as a Bluetooth® Low Energy (Bluetooth LE) protocol stack supporting Bluetooth 5 and RF-Proprietary examples, the Free-RTOS kernel and TIDrivers in one easy-to-use software package along with example applications and exhaustive documentation.

Prerequisites

All you need to get started:

  • One CC2340R5 LaunchPad

  • A computer running a supported operating system listed in the Release Notes

Tip

To get your first program running on the CC23xx the fastest route is to use CCS Cloud as it requires minimum installation and setup. When going further in the development, users generally prefer to install locally the tools they need - guidance through this process can also be found in this document.

Development using CCS Cloud

The fastest way to get started is to use CCS Cloud. When using CCS Cloud, everything is in the cloud so you do not need a local installation of the compiler (TIClang), IDE or SDK.

  1. Visit TI Developer Zone, and make sure you are signed in.

  2. Click on Create a new project.

  3. Select your board, in this case lets use CC2340R5 LaunchPad.

../_images/ccs_cloud_board_select.png
  1. Select the target example to use, lets use the empty project initially.

../_images/ccs_cloud_select_new_project.png
  1. Set the compiler and kernel, lets use TI Clang and FreeRTOS.

../_images/ccs_cloud_configure.png
  1. Click create.

  2. A new window will open with CCS Cloud, open the file explorer to view your projects, and select the empty.c file to edit as needed.

../_images/ccs_cloud_open_empty.png

Tip

The sections here after guide you through the installation process and first steps with locally installed tools.

You will be guided to install an IDE (CCS or IAR) and the SDK.

Optionally, you can also install the Flash Programmer (UniFlash) and the RF Evaluation tool (SmartRF Studio).

IDE - Download and Installation

Only one IDE (CCS or IAR) is required. For CCS, refer to CCS Download and Installation. For IAR, refer to IAR Download and Installation.

CCS Download and Installation

This section covers the required settings for a CCS installation. The CCS toolchain contains many features beyond the scope of this document. More information and documentation can be found on the Code Composer Studio tool page.

Check the SimpleLink Low Power F3 SDK release notes to see which CCS version to use and any required workarounds. Object code produced by CCS may differ in size and performance as compared to IAR produced object code.

  1. Download and install TI Arm Clang Compiler Tools. We recommend that you use the default installation folder.

  2. Download CCS

    CCS is available here: Code Composer Studio .

    Refer to the SDK release notes for the version that is compatible with this SDK.

  3. Installation Options

    During the installation, the following options are recommended:

    • We recommend that you use the default installation folder

    ../_images/ccs-install.png

    Figure 1. Default CCS Installation Location

    • You will then be prompted to select the components. Select “Wireless connectivity”.

    ../_images/ccs_install_select_processor_support.png

    Figure 2. Select Processor Support

    To use a debug probe, select TI XDS Debug Probe Support and any other options you would like. The CC23xx LaunchPad uses TI XDS Debug Probe by default.

    ../_images/ccs-v11-debugger-options.png

    Figure 3. CCS Debugger Options

  4. Discovering the SDK in CCS

    If not already done, install the SDK in the default location pointed to by the installer - c:/ti and restart CCS. CCS will automatically detect the latest install.

    Code Composer Studio automatically discovers the SimpleLink Low Power F3 SDK if it installed in its default installation directory (c:/ti). Once discovered by CCS, it defines a build environment variable named COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR which is used by all SimpleLink Low Power F3 SDK projects.

    If a project is imported from a path other than what was specified during the SimpleLink Low Power F3 SDK installation, the COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR variable must be redefined after the import proceeding at a project-by-project basis. Project import is described later in this guide.

    To redefine this variable:

    1. Open the CCS project’s properties (ProjectProperties)

    2. Navigate to ResourceLinked Resources and edit COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR and have it point to your imported root directory location.

      ../_images/redefine-ccs-linked-resources-cc23xx.png

      Figure 4. Redefining COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR

Tip

You are done with CCS installation and setup. You can now proceed with SDK - Download and Installation

IAR Download and Installation

This section covers the required settings for a IAR installation. The IAR toolchain contains many features beyond the scope of this document. More information and documentation can be found at IAR.com.

Not all components in the SimpleLink Low Power F3 SDK support IAR projects. Check the SimpleLink Low Power F3 SDK and component release notes to check IAR support, which IAR version to use and any required workarounds. Object code produced by IAR may differ in size and performance as compared to CCS produced object code.

  1. Download IAR

    Download and install IAR Embedded Workbench for Arm. Please see the SDK release notes for what version of IAR the SDK supports. You can get IAR for Arm here: https://www.iar.com/iar-embedded-workbench/partners/texas-instruments/ti-wireless/

    To get IAR, choose one of the following methods:

    • Download the IAR Embedded Workbench 30-Day Evaluation Edition – This version of IAR is free, has full functionality, and includes all of the standard features. The size-limited Kickstart evaluation option is not compatible with this SDK.

    • Purchase the full-featured version of IAR Embedded Workbench – For complete Bluetooth LE application development using the CC23xx, TI recommends purchasing the complete version of IAR without any restrictions. You can find the information on purchasing the complete version of IAR.

    Attention

    The version required is stated in the release notes. Opening IAR project files with a previous version of IAR may cause project file corruption.

  2. Installation Options

    Begin Installation by selecting Install IAR Embedded Workbench® for Arm.

    ../_images/iar-install.jpg

    Figure 5. IAR Installer

    Click through the installation confirm windows and license agreement. We recommend installing to the default path

    ../_images/iar_install_dir.png

    Figure 6. Default IAR Installation Location

    Make sure to select TI XDS as one of the debug probe drivers. You may also select other drivers. The driver will be installed towards the end of the installation of IAR.

    ../_images/iar_install_debug_drivers.png

    Figure 7. IAR Debugger Options

  3. Show Build Messages

    TI recommends showing all the build output messages for full verbosity during building. To do this, after importing a workspace, right-click in the Debug log window and select All. (see Figure 8.)

    ../_images/iar-show-build-messages.png

    Figure 8. Show All Build Messages in IAR

SDK - Download and Installation

The SimpleLink Low Power F3 SDK can be downloaded from the following places:

Build your first program for the CC23xx device

  1. Open CCS.

  2. In CCS, click Project > Import CCS Projects.

  3. When prompted, browse your files to locate the folder <SDK>\examples\rtos\LP_EM_CC2340R5\drivers\empty.

  4. Select the project then click “Finish”.

  5. The project will be imported and appear in the “Project Explorer”.

    ../_images/project_in_explorer.png
  6. Build the project.

    • Set the project as the active project.

    • Select Project -> Build All to build the project.

    • As part of the prebuild process, SysConfig will run and generate code based on the .syscfg in the workspace. For more information on SysConfig, see the SysConfig chapter of the User’s Guide.

Run your first program on the CC23xx device

Connect the CC2340Rx to the computer

This section provide a few options to connect your CC23xx device to a computer. This is required to download code on the device, run a debugging session, perform some power measurements, etc.

Option 1 - With a Modular LaunchPad™ Emulator

If you’re using one of the new TI Modular Launchpads™, you’ll need to connect the two sides of the Modular Launchpad™ together.

../_images/modular_lp_mounting.png

Option 2 - With a TI LaunchPad™

If you do not have access to a Modular LaunchPad™ Emulator, you can replace it by the upper part of a CC26x2R LaunchPad (or any TI Launchpad where a XDS110 debugger is available on the board).

  1. Unplug the CC26x2R LaunchPad board

  2. Remove all the jumpers from the CC26x2R LaunchPad board, except the one powering the XDS110.

  3. Connect the required signals of the CC26x2R LaunchPad board with the signals of the CC23xx LaunchPad.

    The signals are named differently on the CC26x2R LaunchPad board and on the CC23xx LaunchPad. Here how the signals should be connected.

    CC26x2R LaunchPad board

    CC23xx LaunchPad

    GND

    GND

    5V

    5V

    3V3

    3V3

    RXD

    RXD

    TXD

    TXD

    RESET

    nRST

    TMS

    SWDIO

    TCK

    SWDCK

    TDO

    Not Connected

    TDI

    Not Connected

    SWO

    Not Connected

    Several alternatives are possible to achieve this

    • (Alternative 1) Use a 10-pin connector to connect the output of the XDS-110 to the XDS-110 input of the CC2340Rx Launchpad.

      ../_images/connect_option2_alternative1.jpg

      Figure 9. Connect the CC2340Rx LaunchPad using a 10-pin cable - The board on the left is a CC26x2R LaunchPad, the board on the right is the C2340Rx Launchpad.

      Note

      This does not connect the Tx and Rx UART signals to the debugger. These signals should be connected using a jumper wire. Usually, DIO22 is used for UART RX and DIO20 is used for TX.

    • (Alternative 2) Use a few jumper wires. The figure below shows the minimum required connections to perform software download. Additional connections will be required for reset and UART.

      ../_images/connect_option2_alternative2.png

      Figure 10. Connect the CC2340Rx LaunchPad using jumper wires - The board on the left is a CC26x2R LaunchPad, the board on the right is the C2340Rx LaunchPad.

Flash the device

Using CCS, download the project on the device using the Debug button.

Note

You may be prompted to update the XDS110 firmware – make sure to click “Update”.

Flash a pre-compiled image

Option 1 - Using UniFlash

This is the recommended approach. It requires to install an additional tool (UniFlash) but enables a more user-friendly interface.

Please refer to the procedure described in the next section.

Option 2 - Using CCS

As shown before, CCS can be used to build and flash images on the device. CCS can also be used to flash pre-built images.

Important

Make sure to import a CC2340R5 example - in other word to follow the previous sections - before attempting to flash a pre-compiled image. Otherwise, CCS will miss the debugging configuration files and may not let you download the image on the target.

  1. Click on the small arrow next to the “Flash” icon.

    ../_images/flash_precompiled_image1.png
  2. Browse to find the .out or .hex file you want

    ../_images/flash_precompiled_image2.png
  3. Click “OK”.

    A few operations should occur in background. The progression of these can be seen at the bottom right of the CCS window.

    ../_images/flash_precompiled_image3.png

    After that, you should get a window showing the progress of the download. No action is required, the download will occur automatically.

    ../_images/flash_precompiled_image4.png

UniFlash for CC23xx

Download and Installation

  1. Download UniFlash

  2. Execute the installer to install UniFlash in the default location (c:/ti).

Usage

  1. Select the device you are working with.

    ../_images/uniflash_step1.png
  2. Select the debugger used and click on “Start”

    ../_images/uniflash_step2.png

SmartRF Studio for CC23xx

SmartRF Studio helps running RF tests on the CC23xx.

Download and Installation

  1. Download SmartRF Studio 8 with support for CC23xx from the software product page on TI’s website.

  2. Execute this file to install SmartRF Studio 8.

Device Connection

  1. Start SmartRF Studio 8. Below screenshot shows the UI without hardware connected.

    ../_images/smartrfstudio8_startup.png
  2. Connect the CC23xx LaunchPad to the computer via the LP-XDS110 or LP-XDS110ET using the provided USB cable as described in Connect the CC2340Rx to the computer.

  3. Click on the inline_img_refresh button next to DEVICE SELECTION and the debug probe will be listed as shown below:

    ../_images/smartrfstudio8_connected.png
  4. Double-click on inline_img_devicename to open the Radio Control Window.

    ../_images/smartrfstudio8_radiocontrolwindow.png

RF Settings

Two default PHY settings are provided: 1 Mbps and 2 Mbps. Both at channel 17 (2440 MHz) and with an output power of 5 dBm. To change this settings, press the inline_img_addphy button to the right of the one to be copied to Create new custom PHY based on this PHY. Changing the channel and output power is now possible as shown in Figure 11.

../_images/smartrfstudio8_customphy.png

Figure 11. Creation of custom Bluetooth LE PHY.

Continuous TX/RX

SmartRF Studio 8 can transmit a continous wave on a frequency and output power selected in the RF Settings. Select the tab Continuous TX as shown in Figure 12.

../_images/smartrfstudio8_conttx.png

Figure 12. Transmission of a continuous wave.

The tab Continuous RX enables the reception of signals on a frequency selected in the RF settings, see Figure 13.

../_images/smartrfstudio8_contrx.png

Figure 13. Receiving signals from another CC23xx LaunchPad.

Bluetooth LE Packet TX/RX

Bluetooth LE packets can be transmitted in the Packet TX tab within RF TEST #1 (see Figure 14.). This will transmit non-connectable packets. The payload data can be changed in the UI.

../_images/smartrfstudio8_packettx.png

Figure 14. SmartRF Studio 8 in TX mode transmitting Bluetooth LE packets.

Bluetooth LE packet can be received in the tab Packet RX (see Figure 15.).

../_images/smartrfstudio8_packetrx.png

Figure 15. SmartRF Studio 8 in RX mode receiving Bluetooth LE packets.