Skip to content

Commit 7cc357e

Browse files
[TI] CC2674 migration OTA support (#32026)
* ota support for cc2674 * Restyled by clang-format * Restyled by prettier-markdown --------- Co-authored-by: Restyled.io <commits@restyled.io>
1 parent bf9c86a commit 7cc357e

File tree

4 files changed

+49
-29
lines changed

4 files changed

+49
-29
lines changed

docs/guides/ti/matter_cc2674_migration.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ project accordingly. Example projects can be found in the following location:
1111
The following must be installed on your system before proceeding:
1212

1313
- [SysConfig](https://www.ti.com/tool/SYSCONFIG) v1.16.2 or later
14-
- [SIMPLELINK-LOWPOWER-F2-SDK](https://www.ti.com/tool/SIMPLELINK-LOWPOWER-SDK)
15-
v7.10.01.24
1614

1715
## Matter source code changes
1816

@@ -22,12 +20,20 @@ CC2674P10 device
2220

2321
- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following
2422
defines for the CC2674
25-
- `ti_simplelink_board = CC2674`
26-
- `ti_simplelink_device = CC2674P10RGZ`
27-
- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder
28-
contents with the 7.10.01.24 version from
29-
[TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24)
30-
which is required to add support SDK for the CC2674P10 device.
23+
- `ti_simplelink_board = "CC2674"`
24+
- `ti_simplelink_device = "CC2674P10RGZ"`
25+
- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/source/ti/common/flash/no_rtos/extFlash/bsp.h`,
26+
modify the SPI GPIO pins to the value below:
27+
28+
```
29+
#define BSP_IOID_FLASH_CS IOID_20
30+
#define BSP_SPI_MOSI IOID_9
31+
#define BSP_SPI_MISO IOID_8
32+
#define BSP_SPI_CLK_FLASH IOID_10
33+
34+
```
35+
36+
The GPIO pin values for SPI will need to be adjusted based on your design.
3137

3238
## Configuring `chip.syscfg` in the SysConfig GUI
3339

third_party/ti_simplelink_sdk/mcuboot/flash_map_backend.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
#error "This file must be used with TI_BOOT_USE_EXTERNAL_FLASH enabled"
5656
#endif
5757

58-
#ifdef DeviceFamily_CC13X4
58+
#if defined(DeviceFamily_CC13X4) || defined(DeviceFamily_CC26X4)
5959
#if (MCUBOOT_IMAGE_NUMBER == 2)
6060
#define BOOT_SLOT_1_SIZE 0x0002B000
6161
#define BOOT_SLOT_2_SIZE 0x000CC800

third_party/ti_simplelink_sdk/mcuboot/mcuboot.syscfg

+33-19
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@
3434
* mcuboot.syscfg
3535
*/
3636

37-
38-
const Board = scripting.addModule("/ti/drivers/Board");
37+
const Button = scripting.addModule("/ti/drivers/apps/Button");
38+
const Button1 = Button.addInstance();
39+
const Button2 = Button.addInstance();
40+
const LED = scripting.addModule("/ti/drivers/apps/LED");
41+
const LED1 = LED.addInstance();
42+
const LED2 = LED.addInstance();
3943

4044
/* ======== Board ======== */
41-
var boardName = system.deviceData.board.name;
45+
const deviceId = system.deviceData.deviceId;
4246

4347
/**
4448
* Import the modules used in this configuration.
@@ -50,19 +54,19 @@ for(var setting in ccfgSettings)
5054
CCFG[setting] = ccfgSettings[setting];
5155
}
5256

53-
if (boardName.match(/CC13.2.7|CC26.2.7/))
57+
if (deviceId.match(/CC13.2.7|CC26.2.7/))
5458
{
5559
// mcuboot stored at end of flash alongside CCFG
5660
CCFG.setFlashVectorTable = true;
5761
CCFG.addressFlashVectorTable = 0x000AC000;
5862
}
59-
else if (boardName.match(/CC13.4|CC26.[34]/))
63+
else if (deviceId.match(/CC13.4|CC26.[34]/))
6064
{
6165
// mcuboot stored at the beginning of flash
6266
CCFG.setFlashVectorTable = true;
6367
CCFG.addressFlashVectorTable = 0x00000000;
6468
}
65-
else if (boardName.match(/CC23.0/)) {
69+
else if (deviceId.match(/CC23.0/)) {
6670
// Nothing to do. Default pBldrVtor = 0x00000000
6771
}
6872
else
@@ -73,20 +77,30 @@ else
7377
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";
7478

7579
/* ======== GPIO ======== */
76-
var GPIO = scripting.addModule("/ti/drivers/GPIO");
7780

78-
var gpio0 = GPIO.addInstance();
79-
gpio0.$hardware = system.deviceData.board.components.LED0;
80-
gpio0.$name = "CONFIG_GPIO_LED_0";
81+
Button1.$name = "CONFIG_BTN_LEFT";
82+
if (deviceId.match(/CC2674R/))
83+
{
84+
Button1.button.$assign = "DIO_13";
85+
}
86+
else
87+
{
88+
Button1.button.$assign = "DIO_15";
89+
}
90+
Button1.gpioPin.$name = "CONFIG_GPIO_BTN1";
91+
Button1.gpioPin.pull = "Pull Up";
92+
Button1.gpioPin.interruptTrigger = "Falling Edge";
8193

82-
var gpio1 = GPIO.addInstance();
83-
gpio1.$hardware = system.deviceData.board.components.LED1;
84-
gpio1.$name = "CONFIG_GPIO_LED_1";
94+
Button2.$name = "CONFIG_BTN_RIGHT";
95+
Button2.button.$assign = "DIO_14";
96+
Button2.gpioPin.$name = "CONFIG_GPIO_BTN2";
97+
Button2.gpioPin.pull = "Pull Up";
98+
Button2.gpioPin.interruptTrigger = "Falling Edge";
8599

86-
var gpio2 = GPIO.addInstance();
87-
gpio2.$hardware = system.deviceData.board.components.BUTTON0;
88-
gpio2.$name = "CONFIG_GPIO_BUTTON_0";
100+
LED1.$name = "CONFIG_LED_RED";
101+
LED1.ledPin.$assign = "DIO_6";
102+
LED1.gpioPin.$name = "CONFIG_GPIO_RLED";
89103

90-
var gpio3 = GPIO.addInstance();
91-
gpio3.$hardware = system.deviceData.board.components.BUTTON1;
92-
gpio3.$name = "CONFIG_GPIO_BUTTON_1";
104+
LED2.$name = "CONFIG_LED_GREEN";
105+
LED2.ledPin.$assign = "DIO_7";
106+
LED2.gpioPin.$name = "CONFIG_GPIO_GLED";

third_party/ti_simplelink_sdk/ti_simplelink_sdk.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ template("ti_simplelink_sdk") {
500500

501501
defines += [
502502
"ONE_BLE_LIB_SIZE_OPTIMIZATION",
503-
"NVOCMP_NVPAGES=3",
503+
"NVOCMP_NVPAGES=5",
504504
"NVOCMP_NWSAMEITEM=1",
505505
"CC13X2P",
506506
"SYSCFG",

0 commit comments

Comments
 (0)