Architectural Changes (v7 vs v8)#

Beginning in SiSDK 2024.6.0, Zigbee RTOS applications have changed from a single-task model to a newer multi-task model. Before SiSDK 2024.6.0, RTOS apps, like the legacy Dynamic Multiprotocol (DMP) apps, ran the entire Zigbee stack and app as a single task. This single task also ran the Zigbee Application Framework (AF), where additional user APIs are exposed. The CLI was its own task, which then made calls into the Zigbee app or stack code. This model was not thread-safe on its own, as any number of tasks could call into the app, stack, or both at the same time. The Zigbee task did not have the proper protections in place for having more than one task calling into the Zigbee task. To work around the thread-safety issue in the old model, users would normally need to leverage the custom event handler as described in this KBA (https://community.silabs.com/s/article/avoiding-shared-resources-with-zigbee-and-micrium-x?language=en_US).

The new Zigbee RTOS model, which replaces this legacy one, has two tasks: an app task and a stack task. Thread safety is achieved with the introduction of the Interprocess Communication (IPC) component, which handles the OS messaging of events from the app task to the stack task and vice-versa. A public API sends an IPC message from the calling task to the stack task, while a stack callback is handled by an IPC message from the stack task to some user or application task. This allows the app task to make thread-safe calls into the stack task via public APIs. The CLI task can also make these calls. The user can make their own number of RTOS tasks and issue the same public API calls, which are all thread-safe.

A Zigbee app can still be configured to run as bare metal in addition to running on a RTOS. Whereas before SoC API signatures differed from host-EZSP signatures, all Zigbee API signatures are the same now, regardless of whether the underlying image is a bare metal one, an image running on a RTOS, or a host application running over EZSP to the NCP.

Legacy single task model#

diagramdiagram

New multi-task model#

diagramdiagram