Skip to content

Commit

Permalink
Feature/wifi 917soc wifi sdk 3.0 integration (project-chip#28558)
Browse files Browse the repository at this point in the history
* Added changes for wifisdk v3.0.10

* Added startup file and linker file for dual flash 917 soc

* Added wifisdk build files and removed wisemcu files from SiWx917_sdk.gni

* Added matter_support for 917 soc

* Si917 Common flash initial changes

* Main.cpp modified

* reverting Siwx917 linker file

* Added changes for nvm3 to use from gecko_sdk

* SiWx917 Common Flash modifications

* rs9116 BLE changes

* Adds fix for 917SoC build errors

* Adds fix for 917SoC LED0 and window-app button

* Adds WiFi SDK repository

* Adds sdk_3.0 platform init call

* submodule update for matter support

* Added matter build libshell

* Adds fix for wifi-join retries

* Clean Up done

* Moved Wifi Init code to Matter_config.cpp

* Resolved review comments

* Review Comment solved

* ethernetif.cpp file low level output api changes

* Addressed review Comments

* Review comment addressed

* Restyler applied

* Restyler applied

* Review comment addressed

* Review comment addressed

* Changed Matter Support Pointer

* Updated Matter support to latest

* Review comment addressed

* Removed newly added file from this PR

* Review comment addressed

* Build issues solved

* Wifi SDK and Matter_support pointer updated

* Restyled by clang-format

* Restyled by gn

* Changed path of NVM3 lib from gecko_sdk to Matter_support

---------

Co-authored-by: bhmanda-silabs <[email protected]>
Co-authored-by: thirupathi <[email protected]>
Co-authored-by: rosahay-silabs <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
5 people authored Aug 21, 2023
1 parent cb21294 commit 48420b4
Show file tree
Hide file tree
Showing 31 changed files with 508 additions and 3,221 deletions.
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -318,3 +318,8 @@
url = https://github.com/asriot/ASR550X_Freertos.git
branch = matter
platforms = asr
[submodule "third_party/silabs/wifi_sdk"]
path = third_party/silabs/wifi_sdk
url = https://github.com/SiliconLabs/wiseconnect
branch = master
platforms = efr32
14 changes: 11 additions & 3 deletions examples/platform/silabs/FreeRTOSConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ extern "C" {
#include <stdint.h>

#ifdef SIWX_917
#include "RS1xxxx_9117.h"
extern uint32_t SystemCoreClock;
#else // For EFR32
#include "RTE_Components.h"
Expand Down Expand Up @@ -168,6 +169,13 @@ extern uint32_t SystemCoreClock;
#define configTIMER_QUEUE_LENGTH (10)
#define configTIMER_TASK_STACK_DEPTH (1024)

#ifdef SIWX_917
#ifdef __NVIC_PRIO_BITS
#undef __NVIC_PRIO_BITS
#endif
#define configPRIO_BITS 6 /* 6 priority levels. */
#endif // SIWX_917

/* Interrupt priorities used by the kernel port layer itself. These are generic
to all Cortex-M ports, and do not rely on any particular library functions. */
#define configKERNEL_INTERRUPT_PRIORITY (255)
Expand Down Expand Up @@ -215,13 +223,13 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
#ifdef DIC_ENABLE
#define configTOTAL_HEAP_SIZE ((size_t)(68 * 1024))
#else
#define configTOTAL_HEAP_SIZE ((size_t)(34 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t)(42 * 1024))
#endif // DIC
#else // SL_WIFI
#if SL_CONFIG_OPENTHREAD_LIB == 1
#define configTOTAL_HEAP_SIZE ((size_t)(22 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t)(28 * 1024))
#else
#define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024))
#define configTOTAL_HEAP_SIZE ((size_t)(26 * 1024))
#endif // SL_CONFIG_OPENTHREAD_LIB
#endif // configTOTAL_HEAP_SIZE
#endif // configTOTAL_HEAP_SIZE
Expand Down
18 changes: 12 additions & 6 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
#include "MemMonitoring.h"
#endif

#ifdef SIWX_917
#include "wfx_rsi.h"
#endif /* SIWX_917 */

using namespace ::chip;
using namespace ::chip::Inet;
using namespace ::chip::DeviceLayer;
Expand Down Expand Up @@ -263,14 +267,16 @@ CHIP_ERROR SilabsMatterConfig::InitWiFi(void)
#ifdef SL_WFX_USE_SECURE_LINK
wfx_securelink_task_start(); // start securelink key renegotiation task
#endif // SL_WFX_USE_SECURE_LINK
#elif defined(SIWX_917)
SILABS_LOG("Init RSI 917 Platform");
if (wfx_rsi_platform() != SL_STATUS_OK)
#endif /* WF200_WIFI */

#ifdef SIWX_917
sl_status_t status;
if ((status = wfx_wifi_rsi_init()) != SL_STATUS_OK)
{
SILABS_LOG("RSI init failed");
return CHIP_ERROR_INTERNAL;
ReturnErrorOnFailure((CHIP_ERROR) status);
}
#endif /* WF200_WIFI */
#endif // SIWX_917

return CHIP_NO_ERROR;
}
#endif // SL_WIFI
Expand Down
9 changes: 2 additions & 7 deletions examples/platform/silabs/SiWx917/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ import("${silabs_common_plat_dir}/args.gni")
# Sanity check
assert(chip_enable_wifi)

wisemcu_sdk_root = "${chip_root}/third_party/silabs/wisemcu-wifi-bt-sdk"
silabs_common_plat_dir = "${chip_root}/examples/platform/silabs"

config("chip_examples_project_config") {
Expand Down Expand Up @@ -87,11 +86,7 @@ source_set("siwx917-matter-shell") {
if (chip_build_libshell) {
defines = [ "ENABLE_CHIP_SHELL" ]

sources = [
"${silabs_common_plat_dir}/matter_shell.cpp",
"${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/UDMA.c",
"${wisemcu_sdk_root}/platforms/si91x/drivers/cmsis_driver/USART.c",
]
sources = [ "${silabs_common_plat_dir}/matter_shell.cpp" ]
include_dirs = [
".",
"${silabs_common_plat_dir}",
Expand Down Expand Up @@ -232,7 +227,7 @@ source_set("siwx917-common") {
"${wifi_sdk_dir}/ethernetif.cpp",
"${wifi_sdk_dir}/lwip_netif.cpp",
"${wifi_sdk_dir}/wfx_notify.cpp",
"SiWx917/rsi_if.c",
"SiWx917/sl_wifi_if.c",
"SiWx917/wfx_rsi_host.c",
]

Expand Down

This file was deleted.

Loading

0 comments on commit 48420b4

Please sign in to comment.