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

Gecko SDK 4.4.5 #89

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ RUN \
&& unzip -q -d simplicity_sdk_2024.6.2 simplicity_sdk_2024.6.2.zip \
&& rm simplicity_sdk_2024.6.2.zip

# Gecko SDK 4.4.4
# Gecko SDK 4.4.5
RUN \
curl -o gecko_sdk_4.4.4.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.4/gecko-sdk.zip \
&& unzip -q -d gecko_sdk_4.4.4 gecko_sdk_4.4.4.zip \
&& rm gecko_sdk_4.4.4.zip
curl -o gecko_sdk_4.4.5.zip -L https://github.com/SiliconLabs/gecko_sdk/releases/download/v4.4.5/gecko-sdk.zip \
&& unzip -q -d gecko_sdk_4.4.5 gecko_sdk_4.4.5.zip \
&& rm gecko_sdk_4.4.5.zip

# ZCL Advanced Platform (ZAP) v2024.09.27
RUN \
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/skyconnect_bootloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SkyConnect Bootloader
device: EFR32MG21A020F512IM32
base_project: src/bootloader
filename: "{manifest_name}_{gecko_bootloader_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/skyconnect_openthread_rcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SkyConnect OpenThread RCP
device: EFR32MG21A020F512IM32
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/skyconnect_zigbee_ncp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SkyConnect Zigbee
device: EFR32MG21A020F512IM32
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/yellow_bootloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Yellow Bootloader
device: MGM210PA32JIA
base_project: src/bootloader
filename: "{manifest_name}_{gecko_bootloader_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/yellow_openthread_rcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Yellow OpenThread RCP
device: MGM210PA32JIA
base_project: src/openthread_rcp
filename: "{manifest_name}_{ot_rcp_version.split('/')[-1]}_gsdk_{sdk_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
2 changes: 1 addition & 1 deletion manifests/nabucasa/yellow_zigbee_ncp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Yellow Zigbee
device: MGM210PA32JIA
base_project: src/zigbee_ncp
filename: "{manifest_name}_{ezsp_version}"
sdk: "gecko_sdk:4.4.4"
sdk: "gecko_sdk:4.4.5"
toolchain: "12.2.1.20221205"

gbl:
Expand Down
34 changes: 34 additions & 0 deletions src/zigbee_ncp/config/zigbee_watchdog_periodic_refresh_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/***************************************************************************//**
* @brief Sample watchdog refresh event component configuration header.
********************************************************************************
* # License
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/

// <<< Use Configuration Wizard in Context Menu >>>

// <h>Zigbee Watchdog reset component configuration

// <e SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE> Enable periodic watchdog refresh
// <i> Default: TRUE
// <i> This allows for enabling or disabling periodic watchdog refresh
#define SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE 1

// <o SL_ZIGBEE_WATCHDOG_REFRESH_DURATION_MS> Watchdog refresh duration <50-5000>
// <i> Default: 1000
// <i> Defines the periodic interval at which the watchdog timer is reset in the application
#define SL_ZIGBEE_WATCHDOG_REFRESH_DURATION_MS 1000

// </e>
// </h>

// <<< end of configuration section >>>
59 changes: 59 additions & 0 deletions src/zigbee_ncp/sl_zigbee_watchdog_periodic_refresh.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/***************************************************************************//**
* @file
* @brief Sample watchdog refresh event implementation and related configuration
*******************************************************************************
* # License
* <b>Copyright 2022 Silicon Laboratories Inc. www.silabs.com</b>
*******************************************************************************
*
* The licensor of this software is Silicon Laboratories Inc. Your use of this
* software is governed by the terms of Silicon Labs Master Software License
* Agreement (MSLA) available at
* www.silabs.com/about-us/legal/master-software-license-agreement. This
* software is distributed to you in Source Code format and is governed by the
* sections of the MSLA applicable to Source Code.
*
******************************************************************************/
#include PLATFORM_HEADER
#include "hal.h"
#include "ember.h"
#include "zigbee_app_framework_event.h"
#include "zigbee_app_framework_common.h"
#include "zigbee_watchdog_periodic_refresh_config.h"

#if (SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE == 1)

static sl_zigbee_event_t watchdog_refresh_event;
static void watchdog_refresh_event_handler(sl_zigbee_event_t *event);

// Initialization of watchdog refresh event
void sli_zigbee_watchdog_refresh_handler_init(uint8_t init_level)
{
switch (init_level) {
case SL_ZIGBEE_INIT_LEVEL_EVENT:
{
sl_zigbee_event_init(&watchdog_refresh_event, watchdog_refresh_event_handler);
sl_zigbee_event_set_active(&watchdog_refresh_event);
break;
}
default:
break;
}
}

// In RTOS-based applications, the Zigbee task refreshes the watchdog.
// However, when the node is not on a network the Zigbee task does not run.
// Therefore, there needs to be a way to ensure that the watchdog does not fire
// and reset the node unnecessarily. Below we provide an example of an application
// event that periodically resets the watchdog.
// Note, such a periodic event gets the node out of EM1/EM2 low power modes,
// which may result in unnecessary energy consumption.
// The application should ultimately own the refreshing of the watchdog and tailor
// it based on the specific use case.
// In the bare-metal case, this is done in the zigbee stack and app framework ticks
static void watchdog_refresh_event_handler(sl_zigbee_event_t *event)
{
halResetWatchdog();
sl_zigbee_event_set_delay_ms(&watchdog_refresh_event, SL_ZIGBEE_WATCHDOG_REFRESH_DURATION_MS);
}
#endif //(SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE == 1)
9 changes: 9 additions & 0 deletions src/zigbee_ncp/zigbee_ncp.slcp
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,28 @@ configuration:
value: 1
- name: EMBER_AF_PLUGIN_PACKET_HANDOFF_ALLOW_ALL_PACKETS
value: 1
- name: SL_LEGACY_HAL_DISABLE_WATCHDOG
value: 0
- name: SL_ZIGBEE_WATCHDOG_PERIODIC_REFRESH_ENABLE
value: 1

source:
- path: main.c
- path: app.c
- path: sl_zigbee_watchdog_periodic_refresh.c

config_file:
- path: config/xncp_config.h
file_id: xncp_config
- path: config/zigbee_watchdog_periodic_refresh_config.h

template_contribution:
- name: zigbee_stack_callback
priority: -9999
value: {callback_type: override_append_source_route, function_name: nc_zigbee_override_append_source_route}
- name: zigbee_af_callback
value: {callback_type: event_init, function_name: sli_zigbee_watchdog_refresh_handler_init}


filter:
- name: Wireless Technology
Expand Down
Loading