Skip to content

Commit

Permalink
TI Thread v1.3-1.0 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
adabreuti committed May 30, 2024
1 parent e61f379 commit e7fbbcc
Show file tree
Hide file tree
Showing 110 changed files with 9,236 additions and 975 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
[submodule "third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx"]
path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx
url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git
url = https://github.com/TexasInstruments/simplelink-lowpower-f2-sdk.git
ignore = dirty
[submodule "mbedtls"]
path = third_party/mbedtls/repo
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ add_subdirectory(third_party/mbedtls)
add_subdirectory(src)
add_subdirectory(examples)

set(OPENTHREAD_CONFIG_FILE "openthread-core-cc13xx_cc26xx-config.h")
set(OPENTHREAD_PROJECT_CORE_CONFIG_FILE "openthread-core-cc13xx_cc26xx-config.h")
set(OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE "openthread-core-cc13xx_cc26xx-config-check.h")
set(OPENTHREAD_CONFIG_FILE "openthread-core-cc13xx_cc26xx-config.h" CACHE STRING "")
set(OPENTHREAD_PROJECT_CORE_CONFIG_FILE "openthread-core-cc13xx_cc26xx-config.h" CACHE STRING "")
set(OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE "openthread-core-cc13xx_cc26xx-config-check.h" CACHE STRING "")

target_compile_definitions(ot-config INTERFACE
"OPENTHREAD_CONFIG_FILE=\"${OPENTHREAD_CONFIG_FILE}\""
Expand Down
84 changes: 75 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,58 @@

# OpenThread CC13XX_CC26XX Example

This directory contains the platform drivers necssary to run OpenThread on the Texas Instruments CC13XX_CC26XX family of
Connected MCUs. These drivers use the TI SimpleLink™ SDK for the RTOS enabled platform drivers. The example applications
build with FreeRTOS to enable an environment for the standard device drivers to operate.
This directory contains the platform drivers necessary to run OpenThread on the Texas Instruments CC13XX_CC26XX family of
Connected MCUs. These drivers use the TI SimpleLink™ SDK for the RTOS enabled platform drivers. The example applications are
built with FreeRTOS to enable an environment for the standard device drivers to operate.

The following is the currently supported Thread roles for compatible TI devices. This list may be updated as the Thread stack is updated or new devices are added.

| Device | RCP | MTD | FTD |
| ------------------------ | --- | --- | --- |
| [CC2652R][cc2652r] | x | | |
| [CC2652RB][cc2652rb] | x | | |
| [CC2652P][cc2652p] | x | | |
| [CC2652RSIP][cc2652rsip] | x | | |
| [CC2652PSIP][cc2652psip] | x | | |
| [CC2652R7][cc2652r7] | x | x | x |
| [CC2652P7][cc2652p7] | x | x | x |
| [CC2674R10][cc2674r10] | x | x | x |
| [CC2674P10][cc2674p10] | x | x | x |

[cc2652r]: https://www.ti.com/product/CC2652R
[cc2652rb]: https://www.ti.com/product/CC2652RB
[cc2652p]: https://www.ti.com/product/CC2652P
[cc2652rsip]: https://www.ti.com/product/CC2652RSIP
[cc2652psip]: https://www.ti.com/product/CC2652PSIP
[cc2652r7]: https://www.ti.com/product/CC2652R7
[cc2652p7]: https://www.ti.com/product/CC2652P7
[cc2674r10]: https://www.ti.com/product/CC2674R10
[cc2674p10]: https://www.ti.com/product/CC2674P10

## Navigating TI OpenThread Documentation

The documentation hosted in the `docs` folder is sorted by alphabetical order. After reading the rest of the README document, it is recommended to read the documentation in the following order:

Start with `ti-openthread-release-notes` for important information about versioning, known issues, and more.

- ti-openthread-release-notes

**Optional**, if migration is needed, locate the `thread-migration-guide` folder and reference:

- thread-migration
- thread-cc2674-migration

Then navigate to the `thread-users-guide` folder and read in the following order:

- ti-openthread-overview
- ti-openthread-thread-protocol
- ti-openthread-product-certification
- ti-openthread-example-apps
- ti-openthread-application-development
- ti-openthread-ncp-interface
- ti-openthread-borderrouter-setup-guide

Conclude by opening the `thread-syscfg` folder and refer to the `getting-started` guide and `sysconfig-board` as needed.

## Toolchain

Expand All @@ -23,28 +72,30 @@ $ ./script/bootstrap

## Building

In a Bash terminal, follow these instructions to build the cc13xx_cc26xx examples. Where the SimpleLink board is a
In a Bash terminal, follow these instructions to build the cc13xx_cc26xx examples. The `<simplelink_board>` is a
reference development kit available on ti.com.

```bash
$ cd <path-to-ot-ti>
$ ./script/build LP_CC2652R7
$ ./script/build <simplelink_board>
```

****Attention:**** The above statement is only true when you have already run the bootstrap script.

## Flash Binaries

If the build completed successfully, the `elf` files may be found in `<path-to-ot-ti>/build/bin/`. These files do not
have any file extension.

Loading the built image onto a LaunchPad is supported through two methods; Uniflash and Code Composer Studio (CCS).
Loading the built image onto a LaunchPad is supported through two methods; UniFlash and Code Composer Studio (CCS).
UniFlash can be used to load the image. Code Composer Studio can be used to load the image and debug the source code.

### Code Composer Studio

Programming with CCS will allow for a full debug environment within the IDE. This is accomplished by creating a target
connection to the XDS110 debugger and starting a project-less debug session. The CCS IDE will attempt to find the source
files on the local machine based on the debug information embedded within the ELF. CCS may prompt you to find the source
code if the image was built on another machine or the source code is located in a different location than is recorded
code if the image was built on another machine or the source code is located in a different location than what is recorded
within the ELF.

Download and install [Code Composer Studio][ccs].
Expand Down Expand Up @@ -113,6 +164,22 @@ following options:

[cli]: https://github.com/openthread/openthread/blob/main/src/cli/README.md

## Power Consumption Measurement

Low power mode can be enabled/disabled by going to examples/apps/cli/cli_uart.cpp and changing the defines listed below.

- TIOP_POWER_MEASUREMENT: disable UART/peripherals and automatically start thread device upon boot up.
- TIOP_POWER_SED: will enable features to make device a sleepy end device (SED) and enter deep sleep mode.
- TIOP_POWER_SSED: will enable features to make device a synchronous sleepy end device (SSED).

The Thread network data/features can be modified by changing the defined value/variables listed below:

- TIOP_POWER_PANID
- TIOP_POWER_CH
- TIOP_POWER_POLL_PERIOD
- TIOP_POWER_CSL_PERIOD
- networkKeyVal

## TI Support

For technical support, please consider creating a post on TI's [E2E forum][e2e]. Additionally, we welcome any feedback.
Expand All @@ -133,8 +200,7 @@ Thread Group.

OpenThread support is available on GitHub:

- Bugs and feature requests pertaining to the OpenThread on CC13x2/CC26x2 Examples — [submit to the
openthread/ot-cc13x2-cc26x2 Issue Tracker](https://github.com/openthread/ot-cc13x2-cc26x2/issues)
- Bugs and feature requests pertaining to OpenThread on CC13x2/CC26x2 family — [submit a ticket to the E2E forum](https://e2e.ti.com/support/wireless-connectivity/)
- OpenThread bugs and feature requests — [submit to the OpenThread Issue
Tracker](https://github.com/openthread/openthread/issues)
- Community Discussion - [ask questions, share ideas, and engage with other community
Expand Down
29 changes: 29 additions & 0 deletions boards.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ set(TI_BOARD_VALUES
"LP_CC2652R7"
"LP_CC2652RB"
"LP_CC2652RSIP"
"LP_CC2653P10"
"CC2674P10RGZ"
"CC2674P10RSK"
"CC2674R10RGZ"
"CC2674R10RSK"
)

set_property(CACHE TI_SIMPLELINK_BOARD PROPERTY STRINGS ${TI_BOARD_VALUES})
Expand Down Expand Up @@ -107,6 +112,30 @@ elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_EM_CC1354P10_6")
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )

elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC2653P10")
set(TI_SIMPLELINK_DEVICE "cc13x4_cc26x4" )
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )

elseif(TI_SIMPLELINK_BOARD STREQUAL "CC2674P10RGZ")
set(TI_SIMPLELINK_DEVICE "cc13x4_cc26x4" )
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )

elseif(TI_SIMPLELINK_BOARD STREQUAL "CC2674P10RSK")
set(TI_SIMPLELINK_DEVICE "cc13x4_cc26x4" )
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )

elseif(TI_SIMPLELINK_BOARD STREQUAL "CC2674R10RGZ")
set(TI_SIMPLELINK_DEVICE "cc13x4_cc26x4" )
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )

elseif(TI_SIMPLELINK_BOARD STREQUAL "CC2674R10RSK")
set(TI_SIMPLELINK_DEVICE "cc13x4_cc26x4" )
set(TI_SIMPLELINK_FAMILY "cc13x4_cc26x4" )
set(TI_SIMPLELINK_ISA "m33f" )
else()
if(TI_PLATFORM STREQUAL "cc13xx_cc26xx"
AND NOT TI_SIMPLELINK_BOARD IN_LIST TI_BOARD_VALUES)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 119 additions & 0 deletions docs/thread-migration-guide/thread-cc2674-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# Running OpenThread Examples on the TI SimpleLink CC2674P10 and CC2674R10

## Modification required for the CC2674P10 device
1. First make a copy of the `openthread.syscfg` file and put it in the same directory.

2. Rename the file to `CC2674.syscfg`

3. To open the file add the following line to the top of the file:
```
// @cliArgs --product <path to SDK>/.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 or /ti/boards/LP_EM_CC1354P10_1 --rtos freertos
```
4. Open the syscfg file using the standalone Sysconfig GUI.

5. Click on "Show Device View" and then click "Switch".

<div style="text-align: center;">
<img src="resources/syscfg-switch-1.png">
</div>

6. Select "Board" as "None" and "Device" as "CC2674P10RGZ", Unselect "Lock PinMux", and click "Confirm".

<div style="text-align: center;">
<img src="resources/syscfg-switch-2.png">
</div>

To clear the errors, make the following changes:

1. Clear the error in RF Design by clicking on 'accepting the current value', which should be 'LP_CC2674R10_RGZ' in the drop down menu for 'Based On RF Design'

<div style="text-align: center;">
<img src="resources/syscfg-error-1.png">
</div>

2. Clear Global Event Mask in TI Drivers > RF by clicking on the cross and leaving the field blank

<div style="text-align: center;">
<img src="resources/syscfg-error-2-a.png">
</div>

> Also, set the number of antenna switch control pins to 0.
<div style="text-align: center;">
<img src="resources/syscfg-error-2-b.png">
</div>

3. Clear the current GPIO settings in Ti Drivers > GPIO and press remove all.

<div style="text-align: center;">
<img src="resources/syscfg-error-3-a.png">
</div>

> Add Spinel interrupt pin. Name it CONFIG_SPINEL_INT and give the values shown:
<div style="text-align: center;">
<img src="resources/syscfg-error-3-b.png">
</div>

4. Reconfigure the GPIOs:
- UART2: Configure TI Drivers > UART2 > PinMux as follows (UART Peripheral = UART0, TX Pin = DIO_13/19, RX Pin = DIO_12/18)

<div style="text-align: center;">
<img src="resources/syscfg-error-4-a.png">
</div>

- Buttons: Configure the GPIO for the buttons. Under TI DRIVER APPS > Button, select CONFIG_BTN_LEFT and under Pin Mux, select Button as DIO_15. Then select CONFIG_BTN_RIGHT and under Pin Mux, select Button as DIO_14

<div style="text-align: center;">
<img src="resources/syscfg-error-4-b-1.png">
</div>

<div style="text-align: center;">
<img src="resources/syscfg-error-4-b-2.png">
</div>

- LEDS: Configure the GPIO for the LEDs. Under TI DRIVER APPS > LED, select CONFIG_LED_RED and under Pin Mux, select LED Pin as DIO_6. Then select CONFIG_LED_RIGHT and under Pin Mux, select LED Pin as DIO_7

<div style="text-align: center;">
<img src="resources/syscfg-error-4-c-1.png">
</div>

<div style="text-align: center;">
<img src="resources/syscfg-error-4-c-2.png">
</div>

5. Finally, Uncheck XOSC Cap Array modification

<div style="text-align: center;">
<img src="resources/syscfg-error-5.png">
</div>

## Modifications required for the CC2674R10

After applying all items in the `Modification required for the CC2674P10 device` section in the `SysConfig GUI`
section, the subsequent changes apply specifically for the CC2674R10 and
should be addressed from a SysConfig Editor.

1. Pins will need to be reconfigured as such:

| SysConfig pin name | R10 `PinMux` |
| ------------------ | ------------ |
| UART_RX | `DIO_2` |
| UART_TX | `DIO_3` |
| CONFIG_BTN_LEFT | `DIO_13` |
| CONFIG_BTN_RIGHT | `DIO_14` |
| CONFIG_LED_RED | `DIO_6` |
| CONFIG_LED_GREEN | `DIO_7` |

2. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> Code
Export Configuration_, acknowledge and dismiss the PA radio setup error
3. _Custom -> IEEE 802.15.4-2006, `250 kbps`, `OQPSK`, `DSSS = 1:8` -> RF
Command Symbols_, change `CMD_RADIO_SETUP` from `RF_cmdRadioSetup` to
`RF_cmdIeeeRadioSetup` and add the following functions from the drop-down:
- a CMD_TX_TEST
- b. CMD_IEEE_ED_SCAN
- c. CMD_IEEE_CSMA
- d. CMD_IEEE_RX_ACK

After this, the example's `README.md` instructions can be followed to produce
the executable needed.
12 changes: 12 additions & 0 deletions docs/thread-migration-guide/thread-migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Migration Guide

Below is a collection of porting and migration guides relevant for
TI-Openthread.

## Migration Guides

Migration guide is used to migrate major changes, e.g. from one device to another
device or from one configuration to another.

- CC2674 [GitHub Migration guide](./thread-cc2674-migration.md).

63 changes: 63 additions & 0 deletions docs/thread-syscfg/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Get started with SysConfig

System Configuration Tool (SysConfig) is a graphical interface for
configuring your project. Configuration files, C source files and header
files are generated based on the parameters configured in the SysConfig
dashboard.

SysConfig should be used as a standalone tool for script-based builds (such as for TI-OpenThread).

The below documentation will help for getting started in tailoring the syscfg file to your application needs.

> **_Attention:_**
Files and code generated by SysConfig should be thoroughly checked and
reviewed.

## Using Stand-alone SysConfig

You can find the standalone SysConfig tool on the [SysConfig Standalone
Installer Download Page](https://www.ti.com/tool/SYSCONFIG).

The location of the openthread syscfg file is located here: `/src/openthread.syscfg`
For example, on the github web: https://github.com/TexasInstruments/ot-ti/blob/release/thread-1.3-certification-support/src/openthread.syscfg
The local file in your cloned repository should be used.

This file is used by openthread build scripts, when it invokes SysConfig CLI.
In order to edit the file for your custom application configurations, you'll need to open the file with the SysConfig GUI.
Before doing so, you should add the following line:

```
// @cliArgs --product <path to SDK>/.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 --rtos freertos
```

As an example, after adding the necessary `<path to SDK>`, it would look like:

```
// @cliArgs --product /home/Documents/repos/ot-ti/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/.metadata/product.json --board /ti/boards/LP_EM_CC1354P10_6 --rtos freertos
```

If the file is not found, then you may need to first initialize the submodules:

```
git submodule update --init
```

Now you can open the file in SysConfig GUI.
Once you are done, remove the `@cliArgs` line then save the file. Now the ot-ti build scripts will use the updated .syscfg file.

## Viewing SysConfig Output

To preview the code to be generated reference the `Generated Files` image, the button at the top of
the `Configuration` pane you will find a list of Generated Files. After
selecting a file you will be able, in real-time, to identify how the
changes in the GUI affect the generated files. This will help you review
the relationship between the GUI and the code.

<div style="text-align: center;">
<img src="resources/syscfg_generated_files_ble.png" alt="Generated Files">
<div class="caption">Generated Files</div>
</div>

Whenever you re-build the project, SysConfig will re-generate the files.
Because of this, any changes made directly in the generated files will
be overwritten.
Binary file added docs/thread-syscfg/resources/board_view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e7fbbcc

Please sign in to comment.