Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SL-UP] 917ncp init failure fix #133

8 changes: 4 additions & 4 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
#include "MemMonitoring.h"
#endif

#if defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1
#if ( ( defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1 ) || defined(EXP_BOARD) )
#include <platform/silabs/SiWx917/SiWxPlatformInterface.h>
#include <platform/silabs/wifi/wiseconnect-abstraction/WiseconnectInterfaceAbstraction.h>
#endif // SLI_SI91X_MCU_INTERFACE
#endif // ( ( defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1 ) || defined(EXP_BOARD) )

#include <crypto/CHIPCryptoPAL.h>
// If building with the EFR32-provided crypto backend, we can use the
Expand Down Expand Up @@ -379,9 +379,9 @@ CHIP_ERROR SilabsMatterConfig::InitWiFi(void)
#endif // SL_WFX_USE_SECURE_LINK
#endif // WF200_WIFI

#if defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1
#if ( ( defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1 ) || defined(EXP_BOARD) )
VerifyOrReturnError(sl_matter_wifi_platform_init() == SL_STATUS_OK, CHIP_ERROR_INTERNAL);
#endif // SLI_SI91X_MCU_INTERFACE
#endif // ( ( defined(SLI_SI91X_MCU_INTERFACE) && SLI_SI91X_MCU_INTERFACE == 1 ) || defined(EXP_BOARD) )

return CHIP_NO_ERROR;
}
Expand Down
4 changes: 2 additions & 2 deletions src/platform/silabs/PlatformManagerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void)
err = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init();
SuccessOrExit(err);

#if CHIP_SYSTEM_CONFIG_USE_LWIP && !defined(SLI_SI91X_MCU_INTERFACE)
#if CHIP_SYSTEM_CONFIG_USE_LWIP && !defined(SLI_SI91X_MCU_INTERFACE) && !defined(EXP_BOARD)
// Initialize LwIP.
tcpip_init(NULL, NULL);
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP && !defined(SLI_SI91X_MCU_INTERFACE)
#endif // CHIP_SYSTEM_CONFIG_USE_LWIP && !defined(SLI_SI91X_MCU_INTERFACE) && !defined(EXP_BOARD)

ReturnErrorOnFailure(System::Clock::InitClock_RealTime());

Expand Down
6 changes: 0 additions & 6 deletions src/platform/silabs/wifi/SiWx/WifiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,6 @@ sl_status_t sl_wifi_siwx917_init(void)
RSI_NPSSGPIO_InputBufferEn(RTE_UULP_GPIO_1_PIN, 1);
#endif // ENABLE_CHIP_SHELL
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER

#else
// NCP Configurations
status = sl_matter_wifi_platform_init();
VerifyOrReturnError(status == SL_STATUS_OK, status,
ChipLogError(DeviceLayer, "sl_matter_wifi_platform_init failed: 0x%lx", static_cast<uint32_t>(status)));
#endif // SLI_SI91X_MCU_INTERFACE

sl_wifi_firmware_version_t version = { 0 };
Expand Down
8 changes: 4 additions & 4 deletions src/platform/silabs/wifi/rs911x/platform/efx32_ncp_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@
#include "sl_rsi_utility.h"
#include "sl_si91x_host_interface.h"
#include "sl_si91x_status.h"
#include "sl_si91x_ncp_utility.h"
#include "sl_status.h"
#include "sl_wifi_constants.h"
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
#include <stdbool.h>
#include <string.h>

Expand All @@ -42,18 +40,20 @@
#include "sl_board_control.h"
#endif // SL_BOARD_NAME

#include "sl_si91x_ncp_utility.h"
#include <platform/silabs/wifi/wf200/platform/spi_multiplex.h>
arun-silabs marked this conversation as resolved.
Show resolved Hide resolved

#include "sl_spidrv_exp_config.h"
#include "sl_spidrv_instances.h"
#include "spidrv.h"

#define MAX_DATA_PACKET_SIZE 1800
arun-silabs marked this conversation as resolved.
Show resolved Hide resolved
#define LDMA_MAX_TRANSFER_LENGTH 4096
#define LDMA_DESCRIPTOR_ARRAY_LENGTH (LDMA_MAX_TRANSFER_LENGTH / 2048)

// use SPI handle for EXP header (configured in project settings)
extern SPIDRV_Handle_t sl_spidrv_exp_handle;
#define SPI_HANDLE sl_spidrv_exp_handle
static uint8_t dummy_buffer[MAX_DATA_PACKET_SIZE] = { 0 };
static uint8_t dummy_buffer[1800] = { 0 };
arun-silabs marked this conversation as resolved.
Show resolved Hide resolved

uint32_t rx_ldma_channel;
uint32_t tx_ldma_channel;
Expand Down
Loading