Skip to content

Commit

Permalink
Merge branch 'release/esp-zigbee-sdk-v1.2.3' into 'master'
Browse files Browse the repository at this point in the history
esp-zboss-lib: release/v1.2.3(042315bf)

See merge request espressif/esp-zboss-lib!64
  • Loading branch information
chshu committed Apr 12, 2024
2 parents 326b883 + 1510d65 commit 0d3782a
Show file tree
Hide file tree
Showing 42 changed files with 77 additions and 151 deletions.
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.2.2
version: 1.2.3
description: esp-zboss library component
url: https://github.com/espressif/esp-zboss-lib
dependencies:
Expand Down
30 changes: 10 additions & 20 deletions include/zb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,19 +562,9 @@ Ideally should rework the whole zb_config.h to suit better for that new concept.
/**
Use 64-bit timer
*/
#if ZB_TIMER_TYPE == 64
#ifndef ZB_TIMER_64
#define ZB_TIMER_64
/**
Use 32-bit timer
*/
#elif ZB_TIMER_TYPE == 32
#define ZB_TIMER_32
/**
Use 16-bit timer
*/
#else
#define ZB_TIMER_16
#endif /* ZB_TIMER_TYPE */
#endif /* ZB_TIMER_64 */

#ifndef ZB_CB_QUANT
#define ZB_CB_QUANT 1U
Expand Down Expand Up @@ -647,19 +637,19 @@ Ideally should rework the whole zb_config.h to suit better for that new concept.
/**
Minimal time between MTORR when ZBOSS decided to run MTORR at some event
*/
#define ZB_MIN_TIME_BETWEEN_MTORR ZB_MILLISECONDS_TO_BEACON_INTERVAL(10000u)
#define ZB_MIN_TIME_BETWEEN_MTORR ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(10000u)
/**
If advised to send MTORR, do it after that delay
*/
#define ZB_DELAY_BEFORE_ADVISED_MTORR ZB_MILLISECONDS_TO_BEACON_INTERVAL(2000u)
#define ZB_DELAY_BEFORE_ADVISED_MTORR ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(2000u)


#define ZB_DELAY_BEFORE_ADVISED_MTORR_HIPRI ZB_MILLISECONDS_TO_BEACON_INTERVAL(500u)
#define ZB_DELAY_BEFORE_ADVISED_MTORR_HIPRI ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(500u)

/**
Delay to Send MTORR just after boot
*/
#define ZB_DELAY_BEFORE_MTORR_AT_BOOT ZB_MILLISECONDS_TO_BEACON_INTERVAL(100u)
#define ZB_DELAY_BEFORE_MTORR_AT_BOOT ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(100u)

#endif /*ZB_PRO_STACK*/

Expand Down Expand Up @@ -847,7 +837,7 @@ ZB_ED_RX_OFF_WHEN_IDLE
/**
End device idle time-out
*/
#define ZB_TIME_ED_IDLE ZB_MILLISECONDS_TO_BEACON_INTERVAL(7500)
#define ZB_TIME_ED_IDLE ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(7500)
#endif


Expand Down Expand Up @@ -1000,10 +990,10 @@ ZB_ED_RX_OFF_WHEN_IDLE
See Zigbee specification revision 22 subclause 4.4.11
*/
#ifdef ZB_PRO_STACK
#define ZB_APS_SECURITY_TIME_OUT_PERIOD ZB_MILLISECONDS_TO_BEACON_INTERVAL(10000U)
#define ZB_APS_SECURITY_TIME_OUT_PERIOD ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(10000U)
#else
/* i.e. 700 milliseconds on 2.4 GHz */
#define ZB_APS_SECURITY_TIME_OUT_PERIOD ZB_MILLISECONDS_TO_BEACON_INTERVAL(700U)
#define ZB_APS_SECURITY_TIME_OUT_PERIOD ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(700U)
#endif

/**
Expand Down Expand Up @@ -1717,7 +1707,7 @@ exponent.
*/
#define ZB_ZGPD_CH_SERIES 3U

#define ZB_GPD_COMMISSIONING_RETRY_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(500)
#define ZB_GPD_COMMISSIONING_RETRY_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(500)
#endif /* ZB_ZGPD_ROLE */

/** The maximum number of reports that GPD can send in the Application Description. */
Expand Down
44 changes: 22 additions & 22 deletions include/zb_config_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ key. They use same algorithm.
/*! Sets APS dup checks time out. By default it is 21 sec. This
* interval guaranties total APS retransmission interval (1 original + 2 retransmits).
*/
#define ZB_APS_DUP_CHECK_TIMEOUT ZB_MILLISECONDS_TO_BEACON_INTERVAL(1000)
#define ZB_APS_DUP_CHECK_TIMEOUT ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(1000)

#ifndef ZB_APS_DUPS_TABLE_SIZE
/**
Expand All @@ -229,7 +229,7 @@ key. They use same algorithm.
/*!
Maximum MAC packet waiting time to expire
*/
#define ZB_MAC_INDIRECT_POLL_EXPIRE_TMO ZB_MILLISECONDS_TO_BEACON_INTERVAL(7680U)
#define ZB_MAC_INDIRECT_POLL_EXPIRE_TMO ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(7680U)



Expand Down Expand Up @@ -279,12 +279,12 @@ To satisfy negative test in the testsute of some customer use same value as for
/*!
APS: The base amount of delay before each broadcast parent announce is sent.
*/
#define ZB_APS_PARENT_ANNOUNCE_BASE_TIMER (ZB_SECONDS_TO_BEACON_INTERVAL(10U))
#define ZB_APS_PARENT_ANNOUNCE_BASE_TIMER (ZB_SECONDS_TO_SYS_TIMER_INTERVAL(10U))

/*!
The max amount of jitter that is added to the apsParentAnnounceBaseTimer before each broadcast parent announce is sent.
*/
#define ZB_APS_PARENT_ANNOUNCE_JITTER_MAX (ZB_SECONDS_TO_BEACON_INTERVAL(10U) - 2U)
#define ZB_APS_PARENT_ANNOUNCE_JITTER_MAX (ZB_SECONDS_TO_SYS_TIMER_INTERVAL(10U) - 2U)
/** @endcond */ /*internals_doc*/

/**
Expand Down Expand Up @@ -429,7 +429,7 @@ At the worst case our NWK can skip long address at tx: 8 bytes of reserve.
* The delay between network layer retries.
* Value: 50 ms
*/
#define ZB_NWKC_UNICAST_RETRY_DELAY ZB_MILLISECONDS_TO_BEACON_INTERVAL(50U)
#define ZB_NWKC_UNICAST_RETRY_DELAY ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(50U)

/* max nsdulength = aMaxPHYFrameSize -(nwkcMACFrameOverhead + nwkcMinHeaderOverhead) (D.4 aMaxMACFrameSize) */
/*! Maximum NSDU(Network Service Data Unit) length */
Expand Down Expand Up @@ -921,7 +921,7 @@ Workaround for secure rejoin
/*!
Default fast poll interval
*/
#define ZB_PIM_DEFAULT_FAST_POLL_INTERVAL ZB_QUARTERECONDS_TO_BEACON_INTERVAL(2U)
#define ZB_PIM_DEFAULT_FAST_POLL_INTERVAL ZB_QUARTERECONDS_TO_SYS_TIMER_INTERVAL(2U)

/*!
Default long poll interval
Expand Down Expand Up @@ -964,25 +964,25 @@ Workaround for secure rejoin
#if defined ZB_SUBGHZ_ONLY_MODE || defined ZB_R22_MULTIMAC_MODE
/* For the Sub-GHz bands the minimum and default turbo polling intervals are increased,
because the LBT mechanism periodically blocks the radio */
#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(250U)
#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(250U)
#else
#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(100U)
#define ZB_PIM_DEFAULT_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(100U)
#endif

/*!
Minimal possible turbo poll interval
*/
#if defined ZB_SUBGHZ_ONLY_MODE || defined ZB_R22_MULTIMAC_MODE && !defined SNCP_MODE
#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(250U)
#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(250U)
#else
#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(100U)
//#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(60)
#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(100U)
//#define ZB_PIM_DEFAULT_MIN_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(60)
#endif

/*!
Maximal possible turbo poll interval
*/
#define ZB_PIM_DEFAULT_MAX_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_BEACON_INTERVAL(3000U)
#define ZB_PIM_DEFAULT_MAX_TURBO_POLL_INTERVAL ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(3000U)

/*!
Timeout for turbo poll
Expand All @@ -1001,7 +1001,7 @@ Workaround for secure rejoin
/*!
Timeout for poll buffer allocation retry
*/
#define ZB_PIM_POLL_ALLOC_TIMEOUT ZB_MILLISECONDS_TO_BEACON_INTERVAL(500U)
#define ZB_PIM_POLL_ALLOC_TIMEOUT ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(500U)
/** @endcond *//* internals_doc */
/*!
Integer value representing the
Expand Down Expand Up @@ -1045,7 +1045,7 @@ Workaround for secure rejoin
#define ZB_ZDO_NWK_SCAN_ATTEMPTS 1U
/** @cond internals_doc */
/*! Delay for sending the end device request command. */
#define ZB_ZDO_SEND_ED_TIMEOUT_REQ_DELAY ZB_MILLISECONDS_TO_BEACON_INTERVAL(100U)
#define ZB_ZDO_SEND_ED_TIMEOUT_REQ_DELAY ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(100U)
/** @endcond *//*internals_doc*/
/**********************************************************************/
/************************** MAC SECTION********************************/
Expand Down Expand Up @@ -1311,7 +1311,7 @@ request command frame.
*
* @note Make sure the time value is not too big.
*/
#define ZB_MAX_FRAME_TOTAL_WAIT_TIME_2_4_GHZ (ZB_MILLISECONDS_TO_BEACON_INTERVAL(40U) + 1U)
#define ZB_MAX_FRAME_TOTAL_WAIT_TIME_2_4_GHZ (ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(40U) + 1U)
/*!
* Maximum time to wait for indirect data for SUB GHZ.
*
Expand All @@ -1322,7 +1322,7 @@ request command frame.
* delay in case of it's own transmission right before Received Date Req. This value calculated
* taking into account this possible situation.
*/
#define ZB_MAX_FRAME_TOTAL_WAIT_TIME_SUB_GHZ (ZB_MILLISECONDS_TO_BEACON_INTERVAL(136U) + 1U)
#define ZB_MAX_FRAME_TOTAL_WAIT_TIME_SUB_GHZ (ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(136U) + 1U)


/*!
Expand Down Expand Up @@ -1653,9 +1653,9 @@ request command frame.
/*! Timeout in seconds for the Trust Center to remove the Trust Center link key of the newly joined
node that did not successfully establish a new link key. This attribute
is used by Zigbee coordinator nodes.*/
#define ZB_DEFAULT_BDB_TRUST_CENTER_NODE_JOIN_TIMEOUT ZB_MILLISECONDS_TO_BEACON_INTERVAL(0xfU * 1000U)
#define ZB_DEFAULT_BDB_TRUST_CENTER_NODE_JOIN_TIMEOUT ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(0xfU * 1000U)
/*! Timeout in seconds for the Trust Center to exchange link keys with the newly joined node */
#define ZB_BDBC_TCLINK_KEY_EXCHANGE_TIMEOUT ZB_MILLISECONDS_TO_BEACON_INTERVAL(5000U)
#define ZB_BDBC_TCLINK_KEY_EXCHANGE_TIMEOUT ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(5000U)
/*! Minimum commissioning period */
#define ZB_BDBC_MIN_COMMISSIONING_TIME_S 180U
/*! Number of Trust Center link attempts to exchange link keys with the newly joined node. */
Expand All @@ -1667,12 +1667,12 @@ request command frame.

/*! @cond touchlink */
/* Table 2 Constants used by nodes supporting touchlink */
#define ZB_BDBC_TL_INTER_PANTRANS_ID_LIFETIME ZB_MILLISECONDS_TO_BEACON_INTERVAL(8000U)
#define ZB_BDBC_TL_MIN_STARTUP_DELAY_TIME ZB_MILLISECONDS_TO_BEACON_INTERVAL(2000U)
#define ZB_BDBC_TL_INTER_PANTRANS_ID_LIFETIME ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(8000U)
#define ZB_BDBC_TL_MIN_STARTUP_DELAY_TIME ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(2000U)
/* used for a non-extended touchlink scan */
#define ZB_BDBC_TL_PRIMARY_CHANNEL_SET 0x02108800
#define ZB_BDBC_TL_RX_WINDOW_DURATION ZB_MILLISECONDS_TO_BEACON_INTERVAL(5000U)
#define ZB_BDBC_TL_SCAN_TIME_BASE_DURATION ZB_MILLISECONDS_TO_BEACON_INTERVAL(250U)
#define ZB_BDBC_TL_RX_WINDOW_DURATION ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(5000U)
#define ZB_BDBC_TL_SCAN_TIME_BASE_DURATION ZB_MILLISECONDS_TO_SYS_TIMER_INTERVAL(250U)
/* used for an extended touchlink scan after the bdbcTLPrimaryChannelSet
* channels have been scanned. */
#define ZB_BDBC_TL_SECONDARY_CHANNEL_SET (0x07fff800U ^ ZB_BDBC_TL_PRIMARY_CHANNEL_SET)
Expand Down
3 changes: 2 additions & 1 deletion include/zb_osif_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@
#include "zb_config.h"
#include "zb_types.h"
#include "zb_errors.h"
#if CONFIG_PM_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE
#include "zb_esp_sleep.h"
#include "zb_osif_platform.h"
#endif /* CONFIG_PM_ENABLE && CONFIG_FREERTOS_USE_TICKLESS_IDLE */

/**
* @brief ZBOSS platform interface
Expand Down
3 changes: 0 additions & 3 deletions include/zb_vendor.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,5 @@
/* The time allotted for adding route information using frame data at the beginning (beacon interval units) */
#define ZB_NWK_AGGRESSIVE_ROUTE_ADD_TIME 10U

/* Platform timer type */
#define ZB_TIMER_TYPE 64

/* Memory configuration */
#define ZB_CONFIGURABLE_MEM
Loading

0 comments on commit 0d3782a

Please sign in to comment.