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 or CC27xx family of wireless microcontroller (MCUs). This powerful software toolkit provides a cohesive and consistent software experience for all SimpleLink CC23xx or CC27xx 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:
A computer running a supported operating system listed in the Release Notes
Tip
To get your first program running on the CC23xx or CC27xx 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.
Visit TI Developer Zone, and make sure you are signed in.
Click on Create a new project.
Select your board, in this case lets use CC2340R5 LaunchPad.
Select the target example to use, lets use the empty project initially.
Set the compiler and kernel, lets use TI Clang and FreeRTOS.
Click create.
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.
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.
Download and install TI Arm Clang Compiler Tools. We recommend that you use the default installation folder.
Download CCS
CCS is available here: Code Composer Studio .
Refer to the SDK release notes for the version that is compatible with this SDK.
Installation Options
During the installation, the following options are recommended:
We recommend that you use the default installation folder
You will then be prompted to select the components. Select “Wireless connectivity”.
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.
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:
Open the CCS project’s properties (Project → Properties)
Navigate to Resource → Linked Resources and edit COM_TI_SIMPLELINK_LOWPOWER_F3_SDK_INSTALL_DIR and have it point to your imported root directory location.
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.
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 or CC27xx, 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.
Installation Options
Begin Installation by selecting Install IAR Embedded Workbench® for Arm.
Click through the installation confirm windows and license agreement. We recommend installing to the default path
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.
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.)
SDK - Download and Installation¶
The SimpleLink Low Power F3 SDK can be downloaded from the following places:
TI Resource Explorer then click Wireless Connectivity -> Embedded Software -> SimpleLink Low Power F3 SDK
Build your first program for the CC23xx or CC27xx device¶
Warning
The CC27xx has a Hardware Security Module (HSM) that requires firmware to be flashed after a project flashed with a valid CCFG and SCFG. This process will have to be followed after every mass chip erase without retaining protoected sectors. This is not required for CC23xx.
Note
The HSM image may be found in <sdk root>/bin/HSM.
Open CCS.
In CCS, click Project > Import CCS Projects.
When prompted, browse your files to locate the folder
<SDK>\examples\rtos\LP_EM_CC2340R5\drivers\empty
.Select the project then click “Finish”.
The project will be imported and appear in the “Project Explorer”.
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.
Flash the HSM firmware (Only for CC27xx)
Open UniFlash 8.8 or later
Select the correct LaunchPad or CC27xx device
Select Settings & Utilities and go to the HSM Image section
- Enter the path to the HSM binary
This will be located in <sdk root>/bin/HSM.
Press Program HSM Image
Run your first program on the CC23xx or CC27xx device¶
Connect the CC2340Rx to the computer¶
This section provide a few options to connect your CC23xx or CC27xx 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.
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).
Unplug the CC26x2R LaunchPad board
Remove all the jumpers from the CC26x2R LaunchPad board, except the one powering the XDS110.
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.
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.
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.
Click on the small arrow next to the “Flash” icon.
Browse to find the .out or .hex file you want
Click “OK”.
A few operations should occur in background. The progression of these can be seen at the bottom right of the CCS window.
After that, you should get a window showing the progress of the download. No action is required, the download will occur automatically.
UniFlash for CC23xx or CC27xx¶
Download and Installation¶
Download UniFlash
Execute the installer to install UniFlash in the default location (
c:/ti
).
Usage¶
Select the device you are working with.
Select the debugger used and click on “Start”
SmartRF Studio for CC23xx or CC27xx¶
SmartRF Studio helps running RF tests on the CC23xx or CC27xx.
Download and Installation¶
Download SmartRF Studio 8 with support for CC23xx or CC27xx from the software product page on TI’s website.
Execute this file to install SmartRF Studio 8.
Device Connection¶
Start SmartRF Studio 8. Below screenshot shows the UI without hardware connected.
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.
Click on the button next to
DEVICE SELECTION
and the debug probe will be listed as shown below:Double-click on to open the Radio Control Window.
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 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 12.
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 13.
The tab Continuous RX
enables the reception of signals on a frequency
selected in the RF settings, see Figure 14.
Bluetooth LE Packet TX/RX¶
Bluetooth LE packets can be transmitted in the Packet TX
tab within RF TEST #1
(see Figure 15.). This will transmit
non-connectable packets. The payload data can be changed in the UI.
Bluetooth LE packet can be received in the tab Packet RX
(see
Figure 16.).