Skip to content

Commit fd92b3e

Browse files
Bump gecko-sdk, wifi-sdk and matter support submodules. Small changes to silabs platform code inline with sdk updates. Use latest Docker image version for CI (#32171)
1 parent 5dfaed4 commit fd92b3e

File tree

11 files changed

+75
-59
lines changed

11 files changed

+75
-59
lines changed

.github/workflows/examples-efr32.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
if: github.actor != 'restyled-io[bot]'
3939

4040
container:
41-
image: ghcr.io/project-chip/chip-build-efr32:35
41+
image: ghcr.io/project-chip/chip-build-efr32:36
4242
volumes:
4343
- "/tmp/bloat_reports:/tmp/bloat_reports"
4444
steps:

.github/workflows/release_artifacts.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
runs-on: ubuntu-latest
6969

7070
container:
71-
image: ghcr.io/project-chip/chip-build-efr32:35
71+
image: ghcr.io/project-chip/chip-build-efr32:36
7272
steps:
7373
- name: Checkout
7474
uses: actions/checkout@v4

.gitmodules

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@
239239
[submodule "third_party/silabs/gecko_sdk"]
240240
path = third_party/silabs/gecko_sdk
241241
url = https://github.com/SiliconLabs/gecko_sdk.git
242-
branch = v4.4.0
242+
branch = v4.4.1
243243
platforms = silabs
244244
[submodule "third_party/silabs/wiseconnect-wifi-bt-sdk"]
245245
path = third_party/silabs/wiseconnect-wifi-bt-sdk
@@ -249,7 +249,7 @@
249249
[submodule "third_party/silabs/wifi_sdk"]
250250
path = third_party/silabs/wifi_sdk
251251
url = https://github.com/SiliconLabs/wiseconnect.git
252-
branch = v3.1.1
252+
branch = v3.1.3
253253
platforms = silabs
254254
[submodule "editline"]
255255
path = third_party/editline/repo

examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c

+60-47
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*
1616
******************************************************************************/
1717

18-
#include "FreeRTOS.h"
1918
#include "cmsis_os2.h"
2019
#include "dmadrv.h"
2120
#include "em_cmu.h"
@@ -37,13 +36,16 @@
3736
#include "sl_power_manager.h"
3837
#endif
3938

39+
#define USART_INITSYNC_BAUDRATE 12500000
40+
4041
static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void * userParam);
4142

4243
unsigned int rx_ldma_channel;
4344
unsigned int tx_ldma_channel;
44-
osMutexId_t spi_transfer_mutex = 0;
45+
osMutexId_t ncp_transfer_mutex = 0;
4546

4647
static uint32_t dummy_buffer;
48+
static sl_si91x_host_init_configuration init_config = { 0 };
4749

4850
// LDMA descriptor and transfer configuration structures for USART TX channel
4951
LDMA_Descriptor_t ldmaTXDescriptor;
@@ -70,33 +72,22 @@ static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void * u
7072
static void gpio_interrupt(uint8_t interrupt_number)
7173
{
7274
UNUSED_PARAMETER(interrupt_number);
73-
sl_si91x_host_set_bus_event(NCP_HOST_BUS_RX_EVENT);
74-
// GPIO_IntClear(0xAAAA);
75-
}
76-
77-
void sl_si91x_host_set_sleep_indicator(void)
78-
{
79-
GPIO_PinOutSet(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin);
80-
}
8175

82-
void sl_si91x_host_clear_sleep_indicator(void)
83-
{
84-
GPIO_PinOutClear(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin);
76+
if (NULL != init_config.rx_irq)
77+
{
78+
init_config.rx_irq();
79+
}
8580
}
8681

87-
uint32_t sl_si91x_host_get_wake_indicator(void)
82+
static void efx32_spi_init(void)
8883
{
89-
return GPIO_PinInGet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin);
90-
}
84+
// Default asynchronous initializer (master mode, 1 Mbps, 8-bit data)
85+
USART_InitSync_TypeDef init = USART_INITSYNC_DEFAULT;
9186

92-
sl_status_t sl_si91x_host_init(void)
93-
{
94-
// Enable clock (not needed on xG21)
95-
CMU_ClockEnable(cmuClock_GPIO, true);
87+
init.msbf = true; // MSB first transmission for SPI compatibility
88+
init.autoCsEnable = true; // Allow the USART to assert CS
89+
init.baudrate = USART_INITSYNC_BAUDRATE;
9690

97-
#if SL_SPICTRL_MUX
98-
spi_board_init();
99-
#endif
10091
// Configure SPI bus pins
10192
GPIO_PinModeSet(SPI_MISO_PIN.port, SPI_MISO_PIN.pin, gpioModeInput, 0);
10293
GPIO_PinModeSet(SPI_MOSI_PIN.port, SPI_MOSI_PIN.pin, gpioModePushPull, 0);
@@ -105,12 +96,6 @@ sl_status_t sl_si91x_host_init(void)
10596
// Enable clock (not needed on xG21)
10697
CMU_ClockEnable(SPI_USART_CMU_CLOCK, true);
10798

108-
// Default asynchronous initializer (master mode, 1 Mbps, 8-bit data)
109-
USART_InitSync_TypeDef init = USART_INITSYNC_DEFAULT;
110-
111-
init.msbf = true; // MSB first transmission for SPI compatibility
112-
init.autoCsEnable = true; // Allow the USART to assert CS
113-
init.baudrate = 12500000;
11499
/*
115100
* Route USART RX, TX, and CLK to the specified pins. Note that CS is
116101
* not controlled by USART so there is no write to the corresponding
@@ -139,33 +124,64 @@ sl_status_t sl_si91x_host_init(void)
139124
SPI_USART->TIMING |= /*USART_TIMING_TXDELAY_ONE | USART_TIMING_CSSETUP_ONE |*/ USART_TIMING_CSHOLD_ONE;
140125

141126
// SPI_USART->CTRL_SET |= USART_CTRL_SMSDELAY;
127+
128+
// configure packet pending interrupt priority
129+
NVIC_SetPriority(GPIO_ODD_IRQn, PACKET_PENDING_INT_PRI);
130+
GPIOINT_CallbackRegister(INTERRUPT_PIN.pin, gpio_interrupt);
131+
GPIO_PinModeSet(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, gpioModeInputPullFilter, 0);
132+
GPIO_ExtIntConfig(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, INTERRUPT_PIN.pin, true, false, true);
133+
}
134+
135+
void sl_si91x_host_set_sleep_indicator(void)
136+
{
137+
GPIO_PinOutSet(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin);
138+
}
139+
140+
void sl_si91x_host_clear_sleep_indicator(void)
141+
{
142+
GPIO_PinOutClear(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin);
143+
}
144+
145+
uint32_t sl_si91x_host_get_wake_indicator(void)
146+
{
147+
return GPIO_PinInGet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin);
148+
}
149+
150+
sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration * config)
151+
{
152+
init_config.rx_irq = config->rx_irq;
153+
init_config.rx_done = config->rx_done;
154+
155+
// Enable clock (not needed on xG21)
156+
CMU_ClockEnable(cmuClock_GPIO, true);
157+
158+
#if SL_SPICTRL_MUX
159+
spi_board_init();
160+
#endif
161+
142162
if (transfer_done_semaphore == NULL)
143163
{
144164
transfer_done_semaphore = osSemaphoreNew(1, 0, NULL);
145165
}
146166

147-
if (spi_transfer_mutex == 0)
167+
if (ncp_transfer_mutex == 0)
148168
{
149-
spi_transfer_mutex = osMutexNew(NULL);
169+
ncp_transfer_mutex = osMutexNew(NULL);
150170
}
151171

152-
DMADRV_Init();
153-
DMADRV_AllocateChannel(&rx_ldma_channel, NULL);
154-
DMADRV_AllocateChannel(&tx_ldma_channel, NULL);
172+
efx32_spi_init();
155173

156174
// Start reset line low
157175
GPIO_PinModeSet(RESET_PIN.port, RESET_PIN.pin, gpioModePushPull, 0);
158176

159-
// configure packet pending interrupt priority
160-
NVIC_SetPriority(GPIO_ODD_IRQn, PACKET_PENDING_INT_PRI);
161-
162177
// Configure interrupt, sleep and wake confirmation pins
163-
GPIOINT_CallbackRegister(INTERRUPT_PIN.pin, gpio_interrupt);
164-
GPIO_PinModeSet(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, gpioModeInputPullFilter, 0);
165-
GPIO_ExtIntConfig(INTERRUPT_PIN.port, INTERRUPT_PIN.pin, INTERRUPT_PIN.pin, true, false, true);
166178
GPIO_PinModeSet(SLEEP_CONFIRM_PIN.port, SLEEP_CONFIRM_PIN.pin, gpioModeWiredOrPullDown, 1);
167179
GPIO_PinModeSet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin, gpioModeWiredOrPullDown, 0);
168180

181+
DMADRV_Init();
182+
DMADRV_AllocateChannel(&rx_ldma_channel, NULL);
183+
DMADRV_AllocateChannel(&tx_ldma_channel, NULL);
184+
169185
return SL_STATUS_OK;
170186
}
171187

@@ -174,11 +190,7 @@ sl_status_t sl_si91x_host_deinit(void)
174190
return SL_STATUS_OK;
175191
}
176192

177-
void sl_si91x_host_enable_high_speed_bus()
178-
{
179-
// SPI_USART->CTRL_SET |= USART_CTRL_SMSDELAY | USART_CTRL_SSSEARLY;
180-
// USART_BaudrateSyncSet(SPI_USART, 0, 20000000);
181-
}
193+
void sl_si91x_host_enable_high_speed_bus() {}
182194

183195
/*==================================================================*/
184196
/**
@@ -194,7 +206,7 @@ void sl_si91x_host_enable_high_speed_bus()
194206
*/
195207
sl_status_t sl_si91x_host_spi_transfer(const void * tx_buffer, void * rx_buffer, uint16_t buffer_length)
196208
{
197-
osMutexAcquire(spi_transfer_mutex, 0xFFFFFFFFUL);
209+
osMutexAcquire(ncp_transfer_mutex, 0xFFFFFFFFUL);
198210

199211
#if SL_SPICTRL_MUX
200212
sl_wfx_host_spi_cs_assert();
@@ -268,7 +280,7 @@ sl_status_t sl_si91x_host_spi_transfer(const void * tx_buffer, void * rx_buffer,
268280
}
269281
}
270282

271-
osMutexRelease(spi_transfer_mutex);
283+
osMutexRelease(ncp_transfer_mutex);
272284
#if SL_SPICTRL_MUX
273285
sl_wfx_host_spi_cs_deassert();
274286
#endif // SL_SPICTRL_MUX
@@ -288,6 +300,7 @@ void sl_si91x_host_release_from_reset(void)
288300

289301
void sl_si91x_host_enable_bus_interrupt(void)
290302
{
303+
NVIC_ClearPendingIRQ(GPIO_ODD_IRQn);
291304
NVIC_EnableIRQ(GPIO_ODD_IRQn);
292305
}
293306

examples/platform/silabs/efr32/rs911x/rs9117.gni

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ rs9117_src_sapi = [
2727
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_rsi_utility.c",
2828
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_net_si91x_integration_handler.c",
2929
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/sl_net/src/sl_si91x_net_credentials.c",
30-
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/spi_interface/sl_si91x_spi_driver.c",
30+
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/ncp_interface/spi/sl_si91x_spi.c",
31+
"${wifi_sdk_root}/components/device/silabs/si91x/wireless/ncp_interface/sl_si91x_ncp_driver.c",
3132

3233
# wifi component
3334
"${wifi_sdk_root}/components/protocol/wifi/src/sl_wifi_callback_framework.c",

examples/platform/silabs/efr32/wf200/host_if.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ static void wfx_events_task(void * p_arg)
607607
{
608608
// Enable the power save
609609
SILABS_LOG("WF200 going to DTIM based sleep");
610-
sl_wfx_set_power_mode(WFM_PM_MODE_DTIM, WFM_PM_POLL_FAST_PS, BEACON_1);
610+
sl_wfx_set_power_mode(WFM_PM_MODE_DTIM, WFM_PM_POLL_FAST_PS, BEACON_1, 0 /*timeout*/);
611611
sl_wfx_enable_device_power_save();
612612
}
613613
#endif /* CHIP_CONFIG_ENABLE_ICD_SERVER */

src/platform/silabs/SilabsConfig.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <nvm3_hal_flash.h>
3434
#include <nvm3_lock.h>
3535

36+
#ifndef SIWX_917 // 917soc/wifi-sdk implements the same nvm3 lock/unlock mechanism and it currently can't be overide.
3637
#include <FreeRTOS.h>
3738
#include <semphr.h>
3839
// Substitute the GSDK weak nvm3_lockBegin and nvm3_lockEnd
@@ -57,6 +58,7 @@ void nvm3_lockEnd(void)
5758
VerifyOrDie(nvm3_Sem != NULL);
5859
xSemaphoreGive(nvm3_Sem);
5960
}
61+
#endif // !SIWX_917
6062

6163
namespace chip {
6264
namespace DeviceLayer {
@@ -76,9 +78,9 @@ CHIP_ERROR SilabsConfig::Init()
7678

7779
void SilabsConfig::DeInit()
7880
{
79-
#ifndef BRD4325A // TODO: fix semaphore usage in nvm3_lock for siwx917. use weak implementation for that board instead
81+
#ifndef SIWX_917
8082
vSemaphoreDelete(nvm3_Sem);
81-
#endif // not BRD4325A
83+
#endif // !SIWX_917
8284
nvm3_close(nvm3_defaultHandle);
8385
}
8486

third_party/silabs/efr32_sdk.gni

+1-1
Original file line numberDiff line numberDiff line change
@@ -916,11 +916,11 @@ template("efr32_sdk") {
916916
"${efr32_sdk_root}/platform/security/sl_component/sl_mbedtls_support/src/crypto_aes.c",
917917
"${efr32_sdk_root}/platform/security/sl_component/sl_protocol_crypto/src/sli_protocol_crypto_crypto.c",
918918
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/crypto_management.c",
919+
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_driver_trng.c",
919920
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_aead.c",
920921
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_cipher.c",
921922
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_hash.c",
922923
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_transparent_driver_mac.c",
923-
"${efr32_sdk_root}/platform/security/sl_component/sl_psa_driver/src/sli_crypto_trng_driver.c",
924924
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dcdc_s1.c",
925925
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_emu_s1.c",
926926
"${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_hfxo_s1.c",

third_party/silabs/gecko_sdk

Submodule gecko_sdk updated 2992 files

third_party/silabs/matter_support

Submodule matter_support updated 115 files

third_party/silabs/wifi_sdk

Submodule wifi_sdk updated 1540 files

0 commit comments

Comments
 (0)