From 2535426143b63dafa4a00f5a3e7d0f52e61f9926 Mon Sep 17 00:00:00 2001 From: bhmanda-silabs <107180296+bhmanda-silabs@users.noreply.github.com> Date: Wed, 28 Feb 2024 19:38:40 +0530 Subject: [PATCH] [Silabs] Added fixes for hardfault issue with rs9116 when LCD enabled and 917 NCP-LCD enablement (#32209) * Added fixes for hardfault issue with rs9116 when LCD enabled * resolved build errors with mg12 * Pull request #1552: [MATTER-2763]wifi-917NCP_enabling LCD Merge in WMN_TOOLS/matter from feature/wifi_917ncp_lcd to RC_2.3.0-1.3 Squashed commit of the following: commit 136a77e165aefb649a8187c5177319e13af0f21a Author: bhmanda-silabs Date: Fri Feb 9 22:50:30 2024 +0530 Resolved review comments commit 4c2f020a346c3e6e3c12fb72fc4d8691ed12aaec Author: bhmanda-silabs Date: Thu Feb 8 19:36:25 2024 +0530 removed commented code commit a67ada4d9d56dea11e627887e6ee4d431bae22ad Author: bhmanda-silabs Date: Thu Feb 8 19:29:54 2024 +0530 Removed special characters ... and 3 more commits * resolved review comments * Resolved review comments * Resolved comments and removed ununsed macros * removed semaphore in header file as it is not being used in this file * resolved the comments * Restyled --- examples/platform/silabs/display/demo-ui.c | 16 ++- .../silabs/efr32/rs911x/hal/efx32_ncp_host.c | 26 +++-- .../silabs/efr32/rs911x/hal/efx_spi.c | 95 +++++++----------- .../efr32/rs911x/hal/sl_si91x_ncp_utility.c | 97 +++++++------------ .../efr32/rs911x/hal/sl_si91x_ncp_utility.h | 28 +++--- third_party/silabs/silabs_board.gni | 6 -- 6 files changed, 107 insertions(+), 161 deletions(-) diff --git a/examples/platform/silabs/display/demo-ui.c b/examples/platform/silabs/display/demo-ui.c index ff207fa26656a7..a525ca9c231195 100644 --- a/examples/platform/silabs/display/demo-ui.c +++ b/examples/platform/silabs/display/demo-ui.c @@ -103,18 +103,24 @@ void demoUIInit(GLIB_Context_t * context) sl_status_t updateDisplay(void) { + sl_status_t status = SL_STATUS_OK; #if SIWX_917 && SL_ICD_ENABLED && DISPLAY_ENABLED sl_memlcd_post_wakeup_init(); #endif // SIWX_917 && SL_ICD_ENABLED && DISPLAY_ENABLED #if SL_LCDCTRL_MUX - sl_wfx_host_pre_lcd_spi_transfer(); -#endif // SL_LCDCTRL_MUX - sl_status_t status = DMD_updateDisplay(); -#if SL_LCDCTRL_MUX - sl_wfx_host_post_lcd_spi_transfer(); + status = sl_wfx_host_pre_lcd_spi_transfer(); + if (status != SL_STATUS_OK) + return status; #endif // SL_LCDCTRL_MUX + status = DMD_updateDisplay(); if (status != DMD_OK) return SL_STATUS_FAIL; +#if SL_LCDCTRL_MUX + status = sl_wfx_host_post_lcd_spi_transfer(); + if (status != SL_STATUS_OK) + return status; +#endif // SL_LCDCTRL_MUX + return SL_STATUS_OK; } diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c b/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c index 9f07d3f8f22c16..b48d72cdc00aee 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx32_ncp_host.c @@ -36,12 +36,14 @@ #include "sl_power_manager.h" #endif -#define USART_INITSYNC_BAUDRATE 12500000 +#include "sl_board_control.h" +#include "sl_si91x_ncp_utility.h" +#include "spi_multiplex.h" static bool dma_callback(unsigned int channel, unsigned int sequenceNo, void * userParam); -unsigned int rx_ldma_channel; -unsigned int tx_ldma_channel; +uint32_t rx_ldma_channel; +uint32_t tx_ldma_channel; osMutexId_t ncp_transfer_mutex = 0; static uint32_t dummy_buffer; @@ -81,7 +83,7 @@ static void efx32_spi_init(void) USART_InitSync_TypeDef init = USART_INITSYNC_DEFAULT; init.msbf = true; // MSB first transmission for SPI compatibility - init.autoCsEnable = true; // Allow the USART to assert CS + init.autoCsEnable = false; init.baudrate = USART_INITSYNC_BAUDRATE; // Configure SPI bus pins @@ -109,7 +111,7 @@ static void efx32_spi_init(void) // Enable USART interface pins GPIO->USARTROUTE[SPI_USART_ROUTE_INDEX].ROUTEEN = GPIO_USART_ROUTEEN_RXPEN | // MISO GPIO_USART_ROUTEEN_TXPEN | // MOSI - GPIO_USART_ROUTEEN_CLKPEN | GPIO_USART_ROUTEEN_CSPEN; + GPIO_USART_ROUTEEN_CLKPEN; // Set slew rate for alternate usage pins GPIO_SlewrateSet(SPI_CLOCK_PIN.port, 7, 7); @@ -117,7 +119,7 @@ static void efx32_spi_init(void) // Configure and enable USART USART_InitSync(SPI_USART, &init); - SPI_USART->TIMING |= /*USART_TIMING_TXDELAY_ONE | USART_TIMING_CSSETUP_ONE |*/ USART_TIMING_CSHOLD_ONE; + SPI_USART->TIMING |= USART_TIMING_TXDELAY_ONE | USART_TIMING_CSSETUP_ONE | USART_TIMING_CSHOLD_ONE; // SPI_USART->CTRL_SET |= USART_CTRL_SMSDELAY; @@ -145,6 +147,14 @@ uint32_t sl_si91x_host_get_wake_indicator(void) sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration * config) { +#if SL_SPICTRL_MUX + sl_status_t status = sl_board_disable_display(); + if (SL_STATUS_OK != status) + { + SILABS_LOG("sl_board_disable_display failed with error: %x", status); + return status; + } +#endif // SL_SPICTRL_MUX init_config.rx_irq = config->rx_irq; init_config.rx_done = config->rx_done; @@ -175,8 +185,8 @@ sl_status_t sl_si91x_host_init(sl_si91x_host_init_configuration * config) GPIO_PinModeSet(WAKE_INDICATOR_PIN.port, WAKE_INDICATOR_PIN.pin, gpioModeWiredOrPullDown, 0); DMADRV_Init(); - DMADRV_AllocateChannel(&rx_ldma_channel, NULL); - DMADRV_AllocateChannel(&tx_ldma_channel, NULL); + DMADRV_AllocateChannel((unsigned int *) &rx_ldma_channel, NULL); + DMADRV_AllocateChannel((unsigned int *) &tx_ldma_channel, NULL); return SL_STATUS_OK; } diff --git a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c index 9097177b73a585..daed27f9398a93 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c +++ b/examples/platform/silabs/efr32/rs911x/hal/efx_spi.c @@ -35,21 +35,18 @@ #include "em_gpio.h" #include "em_ldma.h" #include "gpiointerrupt.h" -#include "spidrv.h" - +#include "sl_board_control.h" #include "sl_device_init_clocks.h" #include "sl_device_init_hfxo.h" #include "sl_spidrv_instances.h" #include "sl_status.h" +#include "spidrv.h" #include "silabs_utils.h" #include "spi_multiplex.h" #include "wfx_host_events.h" #include "wfx_rsi.h" -#define DEFAULT_SPI_TRASFER_MODE 0 -// Macro to drive semaphore block minimun timer in milli seconds -#define RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS (50) #if defined(SL_CATALOG_POWER_MANAGER_PRESENT) #include "sl_power_manager.h" #endif @@ -62,6 +59,7 @@ #endif // SL_BTLCTRL_MUX #if SL_LCDCTRL_MUX #include "sl_memlcd.h" +#include "sl_memlcd_display.h" #endif // SL_LCDCTRL_MUX #if SL_MX25CTRL_MUX #include "sl_mx25_flash_shutdown_usart_config.h" @@ -69,22 +67,25 @@ #if defined(EFR32MG12) #include "em_usart.h" - +#include "sl_spidrv_exp_config.h" #define SL_SPIDRV_HANDLE sl_spidrv_exp_handle - #elif defined(EFR32MG24) #include "em_eusart.h" #include "sl_spidrv_eusart_exp_config.h" +#include "spi_multiplex.h" +#else +#error "Unknown platform" +#endif +#if defined(EFR32MG24) #define SL_SPIDRV_HANDLE sl_spidrv_eusart_exp_handle #define SL_SPIDRV_EXP_BITRATE_MULTIPLEXED SL_SPIDRV_EUSART_EXP_BITRATE -#define SL_SPIDRV_UART_CONSOLE_BITRATE SL_UARTDRV_EUSART_VCOM_BAUDRATE -#define SL_SPIDRV_FRAME_LENGTH SL_SPIDRV_EUSART_EXP_FRAME_LENGTH - -#endif // EFR32MG12 || EFR32MG24 +#endif #define CONCAT(A, B) (A##B) #define SPI_CLOCK(N) CONCAT(cmuClock_USART, N) +// Macro to drive semaphore block minimun timer in milli seconds +#define RSI_SEM_BLOCK_MIN_TIMER_VALUE_MS (50) #if SL_SPICTRL_MUX StaticSemaphore_t spi_sem_peripheral; @@ -97,16 +98,6 @@ static TaskHandle_t spiInitiatorTaskHandle = NULL; static uint32_t dummy_buffer; /* Used for DMA - when results don't matter */ -#if defined(EFR32MG12) -#include "sl_spidrv_exp_config.h" -extern SPIDRV_Handle_t sl_spidrv_exp_handle; -#define SL_SPIDRV_HANDLE sl_spidrv_exp_handle -#elif defined(EFR32MG24) -#include "spi_multiplex.h" -#else -#error "Unknown platform" -#endif - // variable to identify spi configured for expansion header // EUSART configuration available on the SPIDRV static bool spi_enabled = false; @@ -129,7 +120,7 @@ void sl_wfx_host_gpio_init(void) #if defined(EFR32MG24) // Set CS pin to high/inactive GPIO_PinModeSet(SL_SPIDRV_EUSART_EXP_CS_PORT, SL_SPIDRV_EUSART_EXP_CS_PIN, gpioModePushPull, PINOUT_SET); -#endif +#endif // EFR32MG24 GPIO_PinModeSet(WFX_RESET_PIN.port, WFX_RESET_PIN.pin, gpioModePushPull, PINOUT_SET); GPIO_PinModeSet(WFX_SLEEP_CONFIRM_PIN.port, WFX_SLEEP_CONFIRM_PIN.pin, gpioModePushPull, PINOUT_CLEAR); @@ -171,8 +162,6 @@ void sl_wfx_host_reset_chip(void) vTaskDelay(pdMS_TO_TICKS(3)); } -void gpio_interrupt([[maybe_unused]] uint8_t interrupt_number) {} - /***************************************************************** * @fn void rsi_hal_board_init(void) * @brief @@ -201,26 +190,12 @@ void rsi_hal_board_init(void) sl_wfx_host_reset_chip(); } -void sl_si91x_host_enable_high_speed_bus() -{ - // dummy function for wifi-sdk -} - #if SL_SPICTRL_MUX -void SPIDRV_SetBaudrate(uint32_t baudrate) -{ - if (EUSART_BaudrateGet(MY_USART) == baudrate) - { - // EUSART synced to baudrate already - return; - } - EUSART_BaudrateSet(MY_USART, 0, baudrate); -} - sl_status_t sl_wfx_host_spi_cs_assert(void) { +#if SL_SPICTRL_MUX xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); - +#endif // SL_SPICTRL_MUX if (!spi_enabled) // Reduce sl_spidrv_init_instances { sl_spidrv_init_instances(); @@ -234,22 +209,23 @@ sl_status_t sl_wfx_host_spi_cs_assert(void) sl_status_t sl_wfx_host_spi_cs_deassert(void) { + sl_status_t status = SL_STATUS_OK; if (spi_enabled) { - if (ECODE_EMDRV_SPIDRV_OK != SPIDRV_DeInit(SL_SPIDRV_HANDLE)) + status = SPIDRV_DeInit(SL_SPIDRV_HANDLE); + if (SL_STATUS_OK == status) { - xSemaphoreGive(spi_sem_sync_hdl); - SILABS_LOG("%s error.", __func__); - return SL_STATUS_FAIL; - } #if defined(EFR32MG24) - GPIO_PinOutSet(SL_SPIDRV_EUSART_EXP_CS_PORT, SL_SPIDRV_EUSART_EXP_CS_PIN); - GPIO->EUSARTROUTE[SL_SPIDRV_EUSART_EXP_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; + GPIO_PinOutSet(SL_SPIDRV_EUSART_EXP_CS_PORT, SL_SPIDRV_EUSART_EXP_CS_PIN); + GPIO->EUSARTROUTE[SL_SPIDRV_EUSART_EXP_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; #endif // EFR32MG24 - spi_enabled = false; + spi_enabled = false; + } } +#if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); - return SL_STATUS_OK; +#endif // SL_SPICTRL_MUX + return status; } #endif // SL_SPICTRL_MUX @@ -320,22 +296,18 @@ sl_status_t sl_wfx_host_post_bootloader_spi_transfer(void) sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) { #if SL_SPICTRL_MUX - if (sl_wfx_host_spi_cs_deassert() != SL_STATUS_OK) - { - return SL_STATUS_FAIL; - } xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); #endif // SL_SPICTRL_MUX - // sl_memlcd_refresh takes care of SPIDRV_Init() - if (SL_STATUS_OK != sl_memlcd_refresh(sl_memlcd_get())) + sl_status_t status = sl_board_enable_display(); + if (SL_STATUS_OK == status) { + // sl_memlcd_refresh takes care of SPIDRV_Init() + status = sl_memlcd_refresh(sl_memlcd_get()); + } #if SL_SPICTRL_MUX - xSemaphoreGive(spi_sem_sync_hdl); + xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX - SILABS_LOG("%s error.", __func__); - return SL_STATUS_FAIL; - } - return SL_STATUS_OK; + return status; } sl_status_t sl_wfx_host_post_lcd_spi_transfer(void) @@ -343,10 +315,11 @@ sl_status_t sl_wfx_host_post_lcd_spi_transfer(void) USART_Enable(SL_MEMLCD_SPI_PERIPHERAL, usartDisable); CMU_ClockEnable(SPI_CLOCK(SL_MEMLCD_SPI_PERIPHERAL_NO), false); GPIO->USARTROUTE[SL_MEMLCD_SPI_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; + sl_status_t status = sl_board_disable_display(); #if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX - return SL_STATUS_OK; + return status; } #endif // SL_LCDCTRL_MUX diff --git a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c index 6a9d02f47dd027..14e47f43f99f5d 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c +++ b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.c @@ -36,6 +36,8 @@ #include "spidrv.h" #include "task.h" +#include "sl_board_control.h" + #include "sl_device_init_clocks.h" #include "sl_device_init_hfxo.h" #include "sl_status.h" @@ -55,14 +57,13 @@ sl_status_t sl_wfx_host_spiflash_cs_deassert(void); #endif // SL_BTLCTRL_MUX #if SL_LCDCTRL_MUX #include "sl_memlcd.h" +#include "sl_memlcd_display.h" +#define SL_SPIDRV_LCD_BITRATE SL_MEMLCD_SCLK_FREQ #endif // SL_LCDCTRL_MUX #if SL_MX25CTRL_MUX #include "sl_mx25_flash_shutdown_usart_config.h" #endif // SL_MX25CTRL_MUX -#define CONCAT(A, B) (A##B) -#define SPI_CLOCK(N) CONCAT(cmuClock_USART, N) - #if SL_SPICTRL_MUX StaticSemaphore_t spi_sem_peripheral; SemaphoreHandle_t spi_sem_sync_hdl; @@ -80,22 +81,17 @@ SemaphoreHandle_t spi_sem_sync_hdl; sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) { #if SL_SPICTRL_MUX - if (sl_wfx_host_spi_cs_deassert() != SL_STATUS_OK) - { - return SL_STATUS_FAIL; - } xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); #endif // SL_SPICTRL_MUX - // sl_memlcd_refresh takes care of SPIDRV_Init() - if (SL_STATUS_OK != sl_memlcd_refresh(sl_memlcd_get())) + sl_status_t status = sl_board_enable_display(); + if (SL_STATUS_OK == status) { + SPIDRV_SetBaudrate(SL_SPIDRV_LCD_BITRATE); + } #if SL_SPICTRL_MUX - xSemaphoreGive(spi_sem_sync_hdl); + xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX - SILABS_LOG("%s error.", __func__); - return SL_STATUS_FAIL; - } - return SL_STATUS_OK; + return status; } /******************************************************** @@ -107,28 +103,24 @@ sl_status_t sl_wfx_host_pre_lcd_spi_transfer(void) **********************************************************/ sl_status_t sl_wfx_host_post_lcd_spi_transfer(void) { - USART_Enable(SL_MEMLCD_SPI_PERIPHERAL, usartDisable); - CMU_ClockEnable(SPI_CLOCK(SL_MEMLCD_SPI_PERIPHERAL_NO), false); - GPIO->USARTROUTE[SL_MEMLCD_SPI_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; + sl_status_t status = sl_board_disable_display(); #if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); #endif // SL_SPICTRL_MUX - return SL_STATUS_OK; + return status; } #endif // SL_LCDCTRL_MUX #if SL_SPICTRL_MUX - void SPIDRV_SetBaudrate(uint32_t baudrate) { -#if !defined(CHIP_9117) - if (EUSART_BaudrateGet(MY_USART) == baudrate) + if (USART_BaudrateGet(SPI_USART) != baudrate) { - // EUSART synced to baudrate already - return; + USART_InitSync_TypeDef usartInit = USART_INITSYNC_DEFAULT; + usartInit.msbf = true; + usartInit.baudrate = baudrate; + USART_InitSync(SPI_USART, &usartInit); } - EUSART_BaudrateSet(MY_USART, 0, baudrate); -#endif } /******************************************************** @@ -160,52 +152,29 @@ sl_status_t spi_board_init() **********************************************************/ sl_status_t sl_wfx_host_spi_cs_assert(void) { +#if SL_SPICTRL_MUX xSemaphoreTake(spi_sem_sync_hdl, portMAX_DELAY); - - if (!spi_enabled) // Reduce sl_spidrv_init_instances - { - -#if defined(EFR32MG24) -#if defined(CHIP_9117) - GPIO_PinOutClear(SPI_CS_PIN.port, SPI_CS_PIN.pin); -#else - sl_spidrv_init_instances(); - GPIO_PinOutClear(SL_SPIDRV_EUSART_EXP_CS_PORT, SL_SPIDRV_EUSART_EXP_CS_PIN); -#endif // CHIP_9117 -#endif // EFR32MG24 - spi_enabled = true; - } +#endif /* SL_SPICTRL_MUX */ + SPIDRV_SetBaudrate(USART_INITSYNC_BAUDRATE); + SPI_USART->TIMING |= USART_TIMING_TXDELAY_ONE | USART_TIMING_CSSETUP_ONE | USART_TIMING_CSHOLD_ONE; + DMADRV_Init(); + DMADRV_AllocateChannel((unsigned int *) &rx_ldma_channel, NULL); + DMADRV_AllocateChannel((unsigned int *) &tx_ldma_channel, NULL); + GPIO_PinOutClear(SL_SPIDRV_EXP_CS_PORT, SL_SPIDRV_EXP_CS_PIN); return SL_STATUS_OK; } sl_status_t sl_wfx_host_spi_cs_deassert(void) { - if (spi_enabled) - { -#if defined(CHIP_9117) - LDMA_DeInit(); - xSemaphoreGive(spi_sem_sync_hdl); - SILABS_LOG("%s error.", __func__); -#else - if (ECODE_EMDRV_SPIDRV_OK != SPIDRV_DeInit(SL_SPIDRV_HANDLE)) - { - xSemaphoreGive(spi_sem_sync_hdl); - SILABS_LOG("%s error.", __func__); - return SL_STATUS_FAIL; - } -#endif -#if defined(EFR32MG24) -#if defined(CHIP_9117) - GPIO_PinModeSet(SPI_CS_PIN.port, SPI_CS_PIN.pin, gpioModePushPull, 1); - GPIO->USARTROUTE[SPI_USART_ROUTE_INDEX].ROUTEEN = PINOUT_CLEAR; -#else - GPIO_PinOutSet(SL_SPIDRV_EUSART_EXP_CS_PORT, SL_SPIDRV_EUSART_EXP_CS_PIN); - GPIO->EUSARTROUTE[SL_SPIDRV_EUSART_EXP_PERIPHERAL_NO].ROUTEEN = PINOUT_CLEAR; -#endif // CHIP_9117 -#endif // EFR32MG24 - spi_enabled = false; - } + DMADRV_DeInit(); + DMADRV_StopTransfer(rx_ldma_channel); + DMADRV_StopTransfer(tx_ldma_channel); + DMADRV_FreeChannel(rx_ldma_channel); + DMADRV_FreeChannel(tx_ldma_channel); + GPIO_PinOutSet(SL_SPIDRV_EXP_CS_PORT, SL_SPIDRV_EXP_CS_PIN); +#if SL_SPICTRL_MUX xSemaphoreGive(spi_sem_sync_hdl); +#endif return SL_STATUS_OK; } #endif // SL_SPICTRL_MUX diff --git a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.h b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.h index a1e6f4525e5bb2..0bd8dae7641807 100644 --- a/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.h +++ b/examples/platform/silabs/efr32/rs911x/hal/sl_si91x_ncp_utility.h @@ -21,35 +21,29 @@ * devices such as External Flash and LCD. * That can be extended to other families as well. */ +#ifndef SL_SI91X_NCP_UTILITY_H +#define SL_SI91X_NCP_UTILITY_H +#pragma once +#include "FreeRTOS.h" +#include "semphr.h" #include "silabs_utils.h" #include "sl_status.h" #include "spi_multiplex.h" #if defined(CHIP_9117) -#include "sl_board_configuration_SiWx917.h" -#else -#include "sl_board_configuration.h" -#if defined(EFR32MG12) #include "em_usart.h" +#include "sl_board_configuration_SiWx917.h" #include "sl_spidrv_exp_config.h" -extern SPIDRV_Handle_t sl_spidrv_exp_handle; -#define SL_SPIDRV_HANDLE sl_spidrv_exp_handle -#elif defined(EFR32MG24) -#include "em_eusart.h" -#include "sl_spidrv_eusart_exp_config.h" -#include "sl_spidrv_instances.h" -#define SL_SPIDRV_HANDLE sl_spidrv_eusart_exp_handle -#else // EFR32MG12 || EFR32MG24 -#error "Unknown platform" -#endif #endif // CHIP_9117 -// variable to identify spi configured for expansion header -// EUSART configuration available on the SPIDRV +#define USART_INITSYNC_BAUDRATE 12500000 #if SL_SPICTRL_MUX sl_status_t spi_board_init(void); -static bool spi_enabled = false; #endif // SL_SPICTRL_MUX + +extern uint32_t rx_ldma_channel; +extern uint32_t tx_ldma_channel; +#endif // SL_SI91X_NCP_UTILITY_H \ No newline at end of file diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 92884e1b52d493..bd52ab31ec93bc 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -62,12 +62,6 @@ if (silabs_board == "") { silabs_board = getenv("SILABS_BOARD") } -# TODO - Enable LCD once multiplexing changes added MATTER-2763 -if (use_SiWx917) { - disable_lcd = true - show_qr_code = false -} - assert(silabs_board != "", "silabs_board must be specified") # Differentiate between boards