.. _zigbee_memory: Zigbee memory requirements ########################## .. contents:: :local: :depth: 2 This page provides information about the amount of flash memory and RAM that is required by :ref:`zigbee_samples`, as well as stack memory requirements for ``main`` and ``zboss`` threads. Use it to check if your application has enough space for a given configuration. Values are provided for :ref:`ZBOSS libraries `. Samples were built using the available :ref:`nrfxlib:zboss`. Unless stated otherwise, the default :file:`prj.conf` was used. .. _zigbee_memory_52840: .. _zigbee_memory_52833: .. _zigbee_memory_5340: .. _zigbee_memory_21540: RAM and flash memory requirements ********************************* RAM and flash memory requirement values differ depending on the DK, and the programmed sample. The following tables list memory requirement values for Zigbee samples. Values are provided in kilobytes (KB). ``n/a`` indicates that the sample with the given variant is not supported on the DK. .. tabs:: .. tab:: nRF52840 The following table lists memory requirements for samples running on the :ref:`nRF52840 DK ` (:ref:`nrf52840dk_nrf52840 `). +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | Sample | ROM, ZBOSS stack + App | ROM, MCUboot bootloader | ROM, ZBOSS non-volatile memory | ROM, ZBOSS product config | Total ROM | RAM, ZBOSS stack + App | Total RAM | +========================================================================================================================+==========================+===========================+==================================+=============================+=============+==========================+=============+ | :ref:`Network coordinator ` | 338 | 0 | 32 | 4 | 374 | 72 | 72 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light bulb ` | 363 | 0 | 32 | 4 | 399 | 58 | 58 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` | 282 | 0 | 32 | 4 | 318 | 53 | 53 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`lib_zigbee_fota` | 297 | 48 | 32 | 4 | 381 | 61 | 61 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` | 393 | 0 | 32 | 4 | 429 | 70 | 70 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` and :ref:`lib_zigbee_fota` | 409 | 48 | 32 | 4 | 493 | 78 | 78 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP ` | 358 | 0 | 32 | 4 | 394 | 84 | 84 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP with USB transport ` | 375 | 64 | 32 | 4 | 475 | 93 | 93 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee application template ` | 338 | 0 | 32 | 4 | 374 | 67 | 67 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell ` | 416 | 0 | 32 | 4 | 452 | 83 | 83 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell over USB ` | 434 | 0 | 32 | 4 | 470 | 93 | 93 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ .. tab:: nRF52833 The following table lists memory requirements for samples running on the :ref:`nRF52833 DK ` (:ref:`nrf52833dk_nrf52833 `). +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | Sample | ROM, ZBOSS stack + App | ROM, MCUboot bootloader | ROM, ZBOSS non-volatile memory | ROM, ZBOSS product config | Total ROM | RAM, ZBOSS stack + App | Total RAM | +========================================================================================================================+==========================+===========================+==================================+=============================+=============+==========================+=============+ | :ref:`Network coordinator ` | 321 | 0 | 16 | 4 | 341 | 66 | 66 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light bulb ` | 346 | 0 | 16 | 4 | 366 | 53 | 53 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` | 265 | 0 | 16 | 4 | 285 | 47 | 47 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`lib_zigbee_fota` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` | 376 | 0 | 16 | 4 | 396 | 65 | 65 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` and :ref:`lib_zigbee_fota` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP ` | 341 | 0 | 16 | 4 | 361 | 79 | 79 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP with USB transport ` | 358 | 64 | 16 | 4 | 442 | 88 | 88 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee application template ` | 321 | 0 | 16 | 4 | 341 | 61 | 61 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell ` | 399 | 0 | 16 | 4 | 419 | 78 | 78 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell over USB ` | 417 | 0 | 16 | 4 | 437 | 87 | 87 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ .. tab:: nRF5340 The following table lists memory requirements for samples running on the :ref:`nRF5340 DK ` (:ref:`nrf5340dk_nrf5340_cpuapp `). +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | Sample | ROM, ZBOSS stack + App | ROM, MCUboot bootloader | ROM, ZBOSS non-volatile memory | ROM, ZBOSS product config | Total ROM | RAM, ZBOSS stack + App | Total RAM | +========================================================================================================================+==========================+===========================+==================================+=============================+=============+==========================+=============+ | :ref:`Network coordinator ` | 311 | 0 | 32 | 4 | 347 | 75 | 75 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light bulb ` | 336 | 0 | 32 | 4 | 372 | 61 | 61 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` | 255 | 0 | 32 | 4 | 291 | 56 | 56 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`lib_zigbee_fota` | 270 | 48 | 32 | 4 | 354 | 71 | 71 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` | 317 | 0 | 32 | 4 | 353 | 68 | 68 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` and :ref:`lib_zigbee_fota` | 333 | 48 | 32 | 4 | 417 | 83 | 83 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP ` | 330 | 0 | 32 | 4 | 366 | 87 | 87 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP with USB transport ` | 348 | 64 | 32 | 4 | 448 | 96 | 96 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee application template ` | 311 | 0 | 32 | 4 | 347 | 70 | 70 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell ` | 390 | 0 | 32 | 4 | 426 | 87 | 87 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell over USB ` | 408 | 0 | 32 | 4 | 444 | 96 | 96 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ .. tab:: nRF21540 The following table lists memory requirements for samples running on the :ref:`nR21540 DK ` (:ref:`nrf21540dk_nrf52840 `). +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | Sample | ROM, ZBOSS stack + App | ROM, MCUboot bootloader | ROM, ZBOSS non-volatile memory | ROM, ZBOSS product config | Total ROM | RAM, ZBOSS stack + App | Total RAM | +========================================================================================================================+==========================+===========================+==================================+=============================+=============+==========================+=============+ | :ref:`Network coordinator ` | 336 | 0 | 32 | 4 | 372 | 72 | 72 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light bulb ` | 361 | 0 | 32 | 4 | 397 | 58 | 58 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` | 280 | 0 | 32 | 4 | 316 | 53 | 53 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`lib_zigbee_fota` | 295 | 48 | 32 | 4 | 379 | 61 | 61 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` and :ref:`lib_zigbee_fota` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP ` | 356 | 0 | 32 | 4 | 392 | 84 | 84 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP with USB transport ` | 373 | 64 | 32 | 4 | 473 | 93 | 93 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee application template ` | 336 | 0 | 32 | 4 | 372 | 67 | 67 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell ` | 414 | 0 | 32 | 4 | 450 | 84 | 84 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell over USB ` | 432 | 0 | 32 | 4 | 468 | 93 | 93 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ .. tab:: nRF52840 Dongle The following table lists memory requirements for samples running on the :ref:`nRF52840 Dongle ` (:ref:`nrf52840dongle_nrf52840 `). +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | Sample | ROM, ZBOSS stack + App | ROM, MCUboot bootloader | ROM, ZBOSS non-volatile memory | ROM, ZBOSS product config | Total ROM | RAM, ZBOSS stack + App | Total RAM | +========================================================================================================================+==========================+===========================+==================================+=============================+=============+==========================+=============+ | :ref:`Network coordinator ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light bulb ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`lib_zigbee_fota` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Light switch ` with :ref:`zigbee_light_switch_sample_nus` and :ref:`lib_zigbee_fota` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`NCP with USB transport ` | 370 | 4 | 32 | 4 | 410 | 92 | 92 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee application template ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell ` | n/a | n/a | n/a | n/a | n/a | n/a | n/a | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ | :ref:`Zigbee shell over USB ` | 428 | 4 | 32 | 4 | 468 | 91 | 91 | +------------------------------------------------------------------------------------------------------------------------+--------------------------+---------------------------+----------------------------------+-----------------------------+-------------+--------------------------+-------------+ .. Stack memory requirements ************************* The following table lists stack memory requirement values for ``main`` and ``zboss`` threads. These measurements were carried out with :ref:`zephyr:thread_analyzer`, using the following Kconfig options for configuration: * For the stack memory size of the ``main`` thread - :kconfig:option:`CONFIG_MAIN_STACK_SIZE` * For the stack memory size of the ``zboss`` thread - :kconfig:option:`CONFIG_ZBOSS_DEFAULT_THREAD_STACK_SIZE` Values are provided in bytes (B). .. tabs:: .. tab:: nRF52 Series The following table lists memory requirements for the :ref:`nRF52 Series ` devices. +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | Sample | ``main`` thread stack usage | ``main`` thread stack size | ``zboss`` thread stack usage | ``zboss`` thread stack size | +================================================================+===============================+==============================+================================+===============================+ | :ref:`Network coordinator ` | 656 | 2048 | 1080 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | :ref:`Light bulb ` | 656 | 2048 | 1080 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | :ref:`Light switch ` | 640 | 2048 | 1080 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ .. tab:: nRF53 Series The following table lists memory requirements for the :ref:`nRF53 Series ` devices. +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | Sample | ``main`` thread stack usage | ``main`` thread stack size | ``zboss`` thread stack usage | ``zboss`` thread stack size | +================================================================+===============================+==============================+================================+===============================+ | :ref:`Network coordinator ` | 724 | 2048 | 1004 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | :ref:`Light bulb ` | 724 | 2048 | 1004 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ | :ref:`Light switch ` | 724 | 2048 | 1020 | 2048 | +----------------------------------------------------------------+-------------------------------+------------------------------+--------------------------------+-------------------------------+ ..