Skip to content

Commit

Permalink
Merge branch 'master' into MatterYamlTests_RunTestsSuitesDarwinFramew…
Browse files Browse the repository at this point in the history
…orkTool
  • Loading branch information
vivien-apple authored Sep 13, 2023
2 parents 60d36e4 + 8edb9f0 commit 5d5a030
Show file tree
Hide file tree
Showing 141 changed files with 20,705 additions and 751 deletions.
2 changes: 2 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ MDNS
MediaInput
MediaPlayback
MediaTek
MEI
mem
memdf
MemMonitoring
Expand Down Expand Up @@ -1429,6 +1430,7 @@ UnitLocalization
unpair
unprovisioned
Unsecure
Unselect
untrusted
updateAvailable
updateNotAvailable
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
"
- name: Build Apps
run: |
Expand Down
3 changes: 0 additions & 3 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ overrides:
############################################################
# Draft PRs
############################################################
- if: "draft or 'WIP' in title"
status: pending
explanation: "PR is draft, pending review"
- if: "draft"
status: pending
explanation: "PR is draft, pending review"
Expand Down
1 change: 1 addition & 0 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)
matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI_NRF700X)
matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS)
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)

if (CONFIG_CHIP_FACTORY_DATA)
matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE)
Expand Down
23 changes: 0 additions & 23 deletions config/nrfconnect/chip-module/Kconfig.features
Original file line number Diff line number Diff line change
Expand Up @@ -230,27 +230,4 @@ config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
within range [-JITTER; +JITTER].

config CHIP_ICD_SUBSCRIPTION_HANDLING
bool "Enables platform specific handling of ICD subscriptions"
help
Enables platform specific implementation that handles ICD subscription requests
and selects subscription report interval value considering maximum interval preferred
by the publisher.

if CHIP_ICD_SUBSCRIPTION_HANDLING

config CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL
int "Maximum preferred interval of sending subscription reports (s)"
default 60
help
Provides maximum preferred interval to be used by a publisher for negotiation
of the final maximum subscription report interval, after receiving a subscription
request from the initiator. This value should be selected as a compromise between
keeping the power consumption low due to not sending reports too often, and allowing
the initiator device to detect the publisher absence reasonably fast due to not sending
the reports too rarely. The current algorithm is to select bigger value from the one
requested by the initiator and the one preferred by the publisher.

endif # CHIP_ICD_SUBSCRIPTION_HANDLING

endif # CHIP
65 changes: 47 additions & 18 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -323,37 +323,66 @@ config CHIP_ENABLE_DNS_CLIENT
help
Enables using the OpenThread DNS client for the Matter service discovery.

config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
bool "Thread Sleepy End Device support"
config CHIP_ENABLE_ICD_SUPPORT
bool "Matter Intermittently Connected Devices support"
default n
depends on OPENTHREAD_MTD
imply OPENTHREAD_MTD_SED
imply OPENTHREAD_MTD_SED if NET_L2_OPENTHREAD
help
Enables the Thread Sleepy End Device (SED) support in Matter.
Enables the Intermittently Connected Device (ICD) support in Matter.

if CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
if CHIP_ENABLE_ICD_SUPPORT

config CHIP_SED_IDLE_INTERVAL
int "Sleepy End Device idle interval (ms)"
config CHIP_ICD_SLOW_POLL_INTERVAL
int "Intermittently Connected Device slow polling interval (ms)"
default 1000
help
Provides the Sleepy End Device wake interval in milliseconds while the
device is idle (which means that there is no active exchange to or from
the device, and its commissioning window is closed).
Provides the Intermittently Connected Device slow polling interval in milliseconds while the
device is in the idle mode. It determines the fastest frequency at which the device will be able
to receive the messages in the idle mode.

config CHIP_SED_ACTIVE_INTERVAL
int "Sleepy End Device active interval (ms)"
config CHIP_ICD_FAST_POLLING_INTERVAL
int "Intermittently Connected Device fast polling interval (ms)"
default 200
help
Provides the Sleepy End Device wake interval in milliseconds while the
device is active (which means that there is an active exchange to or from
the device, or its commissioning window is open).
Provides the Intermittently Connected Device fast polling interval in milliseconds while the
device is in the active mode. It determines the fastest frequency at which the device will be able
to receive the messages in the active mode. The CHIP_ICD_FAST_POLLING_INTERVAL shall be smaller than
CHIP_ICD_ACTIVE_MODE_INTERVAL.

endif # CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
config CHIP_ICD_IDLE_MODE_INTERVAL
int "Intermittently Connected Device idle mode interval (s)"
default 120
help
Provides the Intermittently Connected Device idle mode interval in seconds.
It determines the maximum amount of time the device can stay in the idle mode, which means the
device may be unreachable and not able to receive messages.

config CHIP_ICD_ACTIVE_MODE_INTERVAL
int "Intermittently Connected Device active mode interval (ms)"
default 300
help
Provides the Intermittently Connected Device active mode interval in milliseconds.
It determines the minimum amount of time the device shall stay in the active mode.

config CHIP_ICD_ACTIVE_MODE_THRESHOLD
int "Intermittently Connected Device active mode threshold (ms)"
default 300
help
Provides the Intermittently Connected Device active mode threshold in milliseconds.
It determines the minimum amount of time the device shall stay in the active mode after the network activity.

config CHIP_ICD_CLIENTS_PER_FABRIC
int "Intermittently Connected Device number of clients per fabric"
default 2
help
Provides the Intermittently Connected Device number of clients per fabric. It determines the maximum number
of clients per fabric that can be registered to receive notification from a device if their subscription is lost.

endif # CHIP_ENABLE_ICD_SUPPORT

config CHIP_THREAD_SSED
bool "Enable Thread Synchronized Sleepy End Device support"
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT
depends on OPENTHREAD_CSL_RECEIVER && CHIP_ENABLE_ICD_SUPPORT
help
Enables the Thread Synchronized Sleepy End Device support in Matter.

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- [Silicon Labs - Building](./silabs_efr32_building.md)
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
- [STMicroelectronics (STM32)](./stm32_getting_started_guide.md)
- [TI - Platform Overview](./ti_platform_overview.md)
- [TI - Platform Overview](./ti/ti_platform_overview.md)
- [Open IoT SDK - Platform Overview](./openiotsdk_platform_overview.md)
- [Open IoT SDK - Examples](./openiotsdk_examples.md)
- [Open IoT SDK - Unit Tests](./openiotsdk_unit_tests.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ Example:
- [SiliconLabs](./silabs_efr32_building.md)
- [Simulated Linux](./simulated_device_linux.md)
- [Telink](/examples/lighting-app/telink/README.md)
- [TI Platform](./ti_platform_overview.md)
- [TI Platform](./ti/ti_platform_overview.md)
- [TI All Clusters](/examples/all-clusters-app/cc13x4_26x4/README.md)
- [Tizen](/examples/lighting-app/tizen/README.md)

Expand Down
3 changes: 2 additions & 1 deletion docs/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and features.
*
esp32/README
ti/ti_platform_overview
```

## Build Guides
Expand Down Expand Up @@ -39,7 +40,7 @@ esp32/README
- [Silicon Labs - Documentation](https://github.com/SiliconLabs/matter#readme)
- [Silicon Labs - Building](./silabs_efr32_building.md)
- [Silicon Labs - Software Update](./silabs_efr32_software_update.md)
- [TI - Platform Overview](./ti_platform_overview.md)
- [TI - Platform Overview](./ti/ti_platform_overview.md)

## Tool Guides

Expand Down
6 changes: 3 additions & 3 deletions docs/guides/nrfconnect_examples_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ You can enable the support for Thread Sleepy End Device in Matter by setting the
following Kconfig options:
- `CONFIG_OPENTHREAD_MTD`
- `CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT`
- `CONFIG_CHIP_ENABLE_ICD_SUPPORT`
The following Kconfig options can be used to tune Thread Sleepy End Device wake
intervals:
- `CONFIG_CHIP_SED_IDLE_INTERVAL`
- `CONFIG_CHIP_SED_ACTIVE_INTERVAL`
- `CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL`
- `CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL`
#### Commissioning with NFC support
Expand Down
109 changes: 109 additions & 0 deletions docs/guides/ti/matter_cc2674_migration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Running Matter Examples on the TI SimpleLink CC2674P10 and CC2674R10

The existing Matter project examples are based on LP_EM_CC1354P10_6. If using
the CC2674P10, the following migration steps are required. Developers are
strongly encouraged to start with a `cc13x4_26x4` example and migrate the
project accordingly. Example projects can be found in the following location:
`matter/examples/[application]/cc13x4_26x4`

## Dependencies

The following must be installed on your system before proceeding:

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

## Matter source code changes

The following are changes to the Matter source code files which should be
applied to convert a `matter/examples/[application]/cc13x4_26x4` project to the
CC2674P10 device

- `examples/[application]/cc13x4_26x4/args.gni`, modify/add the following
defines for the CC2674
- `ti_simplelink_board = CC2674`
- `ti_simplelink_device = CC2674P10RGZ`
- `third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx`, replace this folder
contents with the 7.10.01.24 version from
[TI's downloads page](https://www.ti.com/tool/download/SIMPLELINK-LOWPOWER-F2-SDK/7.10.01.24)
which is required to add support SDK for the CC2674P10 device.

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

1. To open `matter/examples/[application]/cc13x4_26x4/chip.syscfg` in the GUI,
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 --rtos freertos
```

2. Open the `syscfg` file using the standalone Sysconfig GUI
(`sysconfig_gui.sh`) from the SysConfig installation folder.
3. Click on _Show Device View_ and then click _Switch_.
4. Select _Board_ as _None_ and _Device_ as _`CC2674P10RGZ`_, Unselect
_`Lock PinMux`_, and click _Confirm_.
5. To fix errors, make the following module changes:
- _RF Design_ and _RF Stacks -> BLE -> Radio_: click on _accepting the
current value_, which should be _`LP_CC2674P10_RGZ`_ in the drop down menu
for _Based On RF Design_
- _TI DEVICES -> Device Configuration_: Clear
_`XOSC Cap Array Modification`_
- _TI DRIVERS -> RF_: Set _Global Event Mask_ as _None_ and _No. of Antenna
Switch Control Pins_ as _0_
- _TI DRIVERS -> UART2 -> `PinMux`_: Set _UART Peripheral_ to _UART0_, _TX
Pin_ to _`DIO_13/19`_, and _RX Pin_ to _`DIO_12/18`_
- _TI DRIVERS APPS -> Button_: Set _`PinMux`_ of _CONFIG_BTN_LEFT_ to
_`DIO_15`_ and _CONFIG_BTN_RIGHT_ to _`DIO_14`_
- _TI DRIVERS APPS -> LED_: Set _`PinMux`_ of _CONFIG_LED_RED_ to _`DIO_6`_
and _CONFIG_LED_RIGHT_ to _`DIO_7`_
6. Save the SysConfig file (click on _Save As_) and ensure the file name matches
the reference from `BUILD.gn` (default project name is `chip.syscfg`).
7. Open the new SysConfig file with a text editor and remove the generated
arguments.
```
/**
* These arguments were used when this file was generated. They will be automatically applied on subsequent loads
* via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
* @cliArgs --device "CC2674P10RGZ" --package "RGZ" --part "Default" --rtos "freertos" --product "[email protected]"
* @versions {"tool":"1.18.0+3130"}
*/
```
8. Move the `*.syscfg` file into the
`matter/examples/[application]/cc13x4_26x4/` folder. Make sure that the
`args.gni` parameters are aligned for the `CC2674P10RGZ` as detailed above,
and build the example using the `README.md` instructions.
## Modifications required for the CC2674R10
After applying all items in the "Configuring `chip.syscfg` in the SysConfig GUI"
section, additional steps must also be applied to generate Matter project for
the CC2674R10.
- `examples/[application]/cc13x4_26x4/args.gni` should have
`ti_simplelink_board` as `CC2674` and `ti_simplelink_device = CC2674R10RGZ`.
- `examples/[application]/cc13x4_26x4/chip.syscfg` opened with a Text Editor
should change `ble.radioConfig.codeExportConfig.$name` to
`ti_devices_radioconfig_code_export_param2` and `ble.rfDesign` to
`LP_EM_CC1354P10_1`
Furthermore, 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:
`CMD_TX_TEST`,`CMD_IEEE_ED_SCAN`, `CMD_IEEE_CSMA`, and `CMD_IEEE_RX_ACK`.
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
```{toctree}
:glob:
:maxdepth: 1
*
```

# Texas Instruments platform overview

The TI platform is a [Matter][matter_gh] platform based on the Texas Instruments
Expand All @@ -6,7 +13,7 @@ Incorporated SimpleLink SDK.
The following diagram is a simplified representation of a Matter application
which built on the TI Platform.

![matter_ti_overview_simplified](images/matter_ti_overview_simplified.png)
![matter_ti_overview_simplified](./../images/matter_ti_overview_simplified.png)

## Texas Instruments SimpleLink SDK

Expand Down Expand Up @@ -96,9 +103,9 @@ handled by the platform implementation files.
Sample Matter applications are provided for the TI platform. These can be used
as reference for your own application.

- [lock-app](../../examples/lock-app/cc13x2x7_26x2x7/README.md)
- [pump-app](../../examples/pump-app/cc13x2x7_26x2x7/README.md)
- [pump-controller-app](../../examples/pump-controller-app/cc13x2x7_26x2x7/README.md)
- [lock-app](../../../examples/lock-app/cc13x2x7_26x2x7/README.md)
- [pump-app](../../../examples/pump-app/cc13x2x7_26x2x7/README.md)
- [pump-controller-app](../../../examples/pump-controller-app/cc13x2x7_26x2x7/README.md)

<hr>

Expand All @@ -110,6 +117,15 @@ SimpleLink SDK.

<hr>

## CC2674 Migration

For instructions on how to migrate the CC1354P10-6 examples to either the
CC2674P10 or the CC2674R10, please refer to the guide linked below.

- [TI CC2674 Migration Guide](./matter_cc2674_migration.md)

<hr>

### TI Support

For technical support, please consider creating a post on TI's [E2E forum][e2e].
Expand Down
Loading

0 comments on commit 5d5a030

Please sign in to comment.