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

[Silabs] Enabled BRD4338A board and configured BTN1 #28928

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/examples/gn_silabs_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ else
fi

# 917 exception. TODO find a more generic way
if [ "$SILABS_BOARD" == "BRD4325B" ] || [ "$SILABS_BOARD" == "BRD4325C" ]; then
if [ "$SILABS_BOARD" == "BRD4325B" ] || [ "$SILABS_BOARD" == "BRD4325C" ] || [ "$SILABS_BOARD" == "BRD4338A" ]; then
echo "Compiling for 917 WiFi SOC"
USE_WIFI=true
optArgs+="chip_device_platform =\"SiWx917\" "
Expand Down
7 changes: 7 additions & 0 deletions src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void RSI_Board_LED_Set(int, bool);
void RSI_Board_LED_Toggle(int);
void RSI_Wakeupsw_config(void);
void RSI_Wakeupsw_config_gpio0(void);
#ifdef SI917_RADIO_BOARD_V2
void RSI_Wakeupsw_config_gpio11(void);
#endif
void sl_system_init(void);
void soc_pll_config(void);
}
Expand All @@ -58,7 +61,11 @@ CHIP_ERROR SilabsPlatform::Init(void)

// BTN0 and BTN1 init
RSI_Wakeupsw_config();
#ifdef SI917_RADIO_BOARD_V2
RSI_Wakeupsw_config_gpio11();
#else
RSI_Wakeupsw_config_gpio0();
#endif

#if SILABS_LOG_ENABLED
silabsInitLog();
Expand Down
17 changes: 7 additions & 10 deletions third_party/silabs/SiWx917_sdk.gni
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ template("siwx917_sdk") {
"KVS_MAX_ENTRIES=${kvs_max_entries}",
"${silabs_mcu}=1",
"${silabs_board}=1",
"SL_BOARD_NAME=${silabs_board}",
"__HEAP_SIZE=0",
"PLATFORM_HEADER=\"platform-header.h\"",
"USE_NVM3=1",
Expand Down Expand Up @@ -163,21 +164,17 @@ template("siwx917_sdk") {
]

if (silabs_board == "BRD4325B") {
defines += [
"BRD4325A",
"BRD4325B",
"DUAL_FLASH_EN",
]
defines += [ "DUAL_FLASH_EN" ]
}
if (silabs_board == "BRD4325C") {
if (wifi_soc_common_flash) {
defines += [
"BRD4325C",
"CHIP_917B0 = 1",
"SL_BOARD_NAME=\"BRD4325C\"",
"COMMON_FLASH_EN=1",
"EXECUTION_FROM_RAM",
"SL_BOARD_REV=\"A01\"",
]
if (silabs_board == "BRD4338A") {
defines += [ "SI917_RADIO_BOARD_V2=1" ]
}
}

if (chip_build_libshell) {
Expand Down Expand Up @@ -407,7 +404,7 @@ template("siwx917_sdk") {
]
}

if (silabs_board == "BRD4325C") {
if (wifi_soc_common_flash) {
sources += [
"${sdk_support_root}/matter/si91x/siwx917/BRD4325x/support/src/startup_common_RS1xxxx.c",
"${wifi_sdk_root}/components/siwx917_soc/drivers/middleware/nvm3/src/sl_si91x_common_flash_intf.c",
Expand Down
10 changes: 10 additions & 0 deletions third_party/silabs/silabs_board.gni
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ declare_args() {
chip_enable_ble_rs911x = false

wifi_soc = false
wifi_soc_common_flash = false

#Disable MQTT by default
enable_dic = false
Expand Down Expand Up @@ -111,12 +112,21 @@ if (silabs_board == "BRD4304A") {
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4325G") {
silabs_family = "SiWx917-common"
silabs_mcu = "SiWG917M111MGTBA"
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4338A") {
silabs_family = "SiWx917-common"
silabs_mcu = "SiWG917M111MGTBA"
disable_lcd = true
show_qr_code = false
wifi_soc = true
wifi_soc_common_flash = true
} else if (silabs_board == "BRD4180A") {
assert(
false,
Expand Down